Overview
ISO/IEC 9075-4:2016/Cor 2:2022 is a Technical Corrigendum (published June 2022) to the ISO/IEC 9075‑4:2016 standard - the SQL part that defines Persistent Stored Modules (SQL/PSM). Prepared by ISO/IEC JTC 1/SC 32 (Data management and interchange), this corrigendum provides clarifications and corrections to the SQL/PSM specification. It updates syntax rules, lexical elements, access-control semantics, handler and control‑flow behavior, and Information Schema references to improve interoperability and conformance for SQL stored procedures and modules.
Key Topics and Requirements
- Clarification of timestamp precision - refines wording about the creation timestamp type for modules (precision/representation is implementation-defined).
- Lexical elements and identifiers - fixes and tightens syntax rules for names and user-defined type name (UDTN) handling to avoid ambiguity when schema names are omitted.
- Routine invocation and assignment rules - supplies corrected syntax and argument handling for routine invocation and store-assignment semantics, pointing to cross-references in ISO/IEC 9075‑2 where applicable.
- Access control / privileges - replaces ambiguous language (e.g., use of “may”) with precise rules: EXECUTE privilege requirements for SQL-server modules and schema-level routines are clarified, including which routines are considered subject routines for revoke logic.
- Handler execution and SQL-client modules - improves error/exception handling rules for SQL procedure statements, notably the behavior when no “most appropriate” handler exists and how unhandled SQLSTATE values are treated.
- Control statements (loops) - reinstates repetition semantics for loop statements and clarifies interactions with exception and leave statements.
- Information Schema corrections - corrects and removes erroneous references and column names in INFORMATION_SCHEMA views related to MODULES and shortname views.
Applications and Users
This corrigendum is essential for:
- Database product implementers (engine and SQL runtime developers) who must align stored‑procedure behavior and security semantics with the SQL standard.
- Language designers and SQL implementers validating parser/BNF changes and lexical rules.
- DBA and application developers relying on predictable stored-procedure execution, exception handling, and privilege enforcement.
- Conformance and test-suite authors who create SQL/PSM compliance tests and Information Schema checks.
Related Standards
- ISO/IEC 9075‑4:2016 (SQL/PSM) - base standard being corrected.
- ISO/IEC 9075‑2 - referenced for store-assignment and procedure-statement rules.
- ISO/IEC JTC 1/SC 32 publications on data management and interchange.
Keywords: SQL/PSM, ISO/IEC 9075-4, Technical Corrigendum, persistent stored modules, SQL stored procedures, Information Schema, SQL standard, database security, EXECUTE privilege.