diff --git a/src/common/backend/utils/errcodes.txt b/src/common/backend/utils/errcodes.txt index f497becd4..05e732597 100644 --- a/src/common/backend/utils/errcodes.txt +++ b/src/common/backend/utils/errcodes.txt @@ -238,7 +238,7 @@ Section: Class 26 - Invalid SQL Statement Name # (we take this to mean prepared statements 26000 E ERRCODE_INVALID_SQL_STATEMENT_NAME invalid_sql_statement_name -26001 E ERRCODE_SLOW_QUERY SLOW_QUERY_statement_name +26001 E ERRCODE_SLOW_QUERY slow_query_statement_name 26002 E ERRCODE_ACTIVE_SESSION_PROFILE active_session_profile Section: Class 27 - Triggered Data Change Violation @@ -392,7 +392,7 @@ Section: Class 42 - Syntax Error or Access Rule Violation 42P15 E ERRCODE_INVALID_SCHEMA_DEFINITION invalid_schema_definition 42P16 E ERRCODE_INVALID_TABLE_DEFINITION invalid_table_definition 42P17 E ERRCODE_INVALID_OBJECT_DEFINITION invalid_object_definition -42P18 E ERRCODE_INVALID_TEMP_OBJECTS invalid temp objects(table, namespace) +42P18 E ERRCODE_INVALID_TEMP_OBJECTS invalid_temp_objects (table, namespace) 42P65 E ERRCODE_INVALID_PACKAGE_DEFINITION invalid_package_definition 42705 E ERRCODE_UNDEFINED_KEY undefined_key 42711 E ERRCODE_DUPLICATE_KEY duplicate_key @@ -535,7 +535,7 @@ XX009 E ERRCODE_STREAM_DUPLICATE_QUERY_ID str XX010 E ERRCODE_INVALID_BUFFER invalid_buffer XX011 E ERRCODE_INVALID_BUFFER_REFERENCE invalid_buffer_reference XX012 E ERRCODE_NODE_ID_MISSMATCH node_id_missmatch -XX013 E ERRCODE_CANNOT_MODIFY_XIDBASE cannot_modify_xidbasea +XX013 E ERRCODE_CANNOT_MODIFY_XIDBASE cannot_modify_xidbase XX014 E ERRCODE_UNEXPECTED_CHUNK_VALUE unexpected_chunk_value XX015 E ERRCODE_CN_RETRY_STUB cn_retry_stub Section: Class CG - CodeGen Error @@ -624,4 +624,4 @@ TS001 E ERRCODE_TS_KEYTYPE_MISMATCH col Section: Class SE - Security Error 42714 E ERRCODE_DUPLICATE_POLICY duplicate_policy 42715 E ERRCODE_DUPLICATE_LABEL duplicate_label -SE001 E ERRCODE_INVALID_AUDIT_LOG invalid audit log +SE001 E ERRCODE_INVALID_AUDIT_LOG invalid_audit_log diff --git a/src/test/regress/expected/plpgsql_condition_name.out b/src/test/regress/expected/plpgsql_condition_name.out new file mode 100644 index 000000000..d5e4f4365 --- /dev/null +++ b/src/test/regress/expected/plpgsql_condition_name.out @@ -0,0 +1,25 @@ +create or replace procedure plpgsql_condition_name1() +as +begin +raise cannot_modify_xidbase using errcode = "XX013"; +end; +/ +create or replace procedure plpgsql_condition_name1() +as +begin +raise invalid_audit_log using errcode = "SE001"; +end; +/ +create or replace procedure plpgsql_condition_name1() +as +begin +raise invalid_temp_objects using errcode = "42P18"; +end; +/ +create or replace procedure plpgsql_condition_name1() +as +begin +raise SLOW_QUERY_STATEMENT_NAME using errcode = "26001"; +end; +/ +drop procedure plpgsql_condition_name1(); diff --git a/src/test/regress/parallel_schedule0 b/src/test/regress/parallel_schedule0 index 2b348de77..5830d8565 100644 --- a/src/test/regress/parallel_schedule0 +++ b/src/test/regress/parallel_schedule0 @@ -718,7 +718,7 @@ test: plpgsql_cursor_rowtype test: plpgsql_assign_list test: plpgsql_package_type plpgsql_package_param test: plpgsql_record_attrname -test: plpgsql_insert_record +test: plpgsql_insert_record plpgsql_condition_name test: hw_package_variable package_typmod_test test: autonomous_cursor test: plpgsql_reset_session @@ -731,7 +731,6 @@ test: tsdb_delta2_compress test: tsdb_xor_compress #test: tsdb_aggregate - test: readline test: hw_to_timestamp hw_view_privilege diff --git a/src/test/regress/sql/plpgsql_condition_name.sql b/src/test/regress/sql/plpgsql_condition_name.sql new file mode 100644 index 000000000..e756bfcc9 --- /dev/null +++ b/src/test/regress/sql/plpgsql_condition_name.sql @@ -0,0 +1,29 @@ +create or replace procedure plpgsql_condition_name1() +as +begin +raise cannot_modify_xidbase using errcode = "XX013"; +end; +/ + +create or replace procedure plpgsql_condition_name1() +as +begin +raise invalid_audit_log using errcode = "SE001"; +end; +/ + +create or replace procedure plpgsql_condition_name1() +as +begin +raise invalid_temp_objects using errcode = "42P18"; +end; +/ + +create or replace procedure plpgsql_condition_name1() +as +begin +raise SLOW_QUERY_STATEMENT_NAME using errcode = "26001"; +end; +/ + +drop procedure plpgsql_condition_name1();