Wiki / SQLSTATE
SQLSTATE
Compare versionsError conditions, diagnostic context, and version-specific definitions.
Reading PG 18current·22 versions documented, 8.1 to 20
-
successful_completion
00000 is the successful-completion SQLSTATE. PostgreSQL's error machinery selects it by default for messages below WARNING when no more specific code is set; a successful command does not need an error message.
-
warning
01000 is the generic warning condition in Class 01, Warning. It is a directory classification, not a description of one particular subsystem or message. PostgreSQL's source directory explicitly says not to use this class for failure conditions.
-
null_value_eliminated_in_set_function
01003 is a warning-category condition whose name describes null elimination in a set function. No resolved 18.6 core/contrib report group was found, so no PostgreSQL aggregate, message, or client severity path is confirmed here.
-
string_data_right_truncation
01004 names right truncation reported as a warning condition. No resolved 18.6 core/contrib report group was found, so this page does not assign a particular cast, encoding path, client, or message.
-
privilege_not_revoked
01006 has confirmed PostgreSQL 18.6 WARNING paths in src/backend/catalog/aclchk.c for REVOKE. It reports a partial or empty privilege change; the command can complete while sending the warning.
-
privilege_not_granted
01007 has confirmed PostgreSQL 18.6 WARNING paths in src/backend/catalog/aclchk.c for GRANT. It reports an empty or partial grant and does not by itself mean the GRANT statement failed as an error.
-
implicit_zero_bit_padding
01008 names a warning-category condition for implicit zero-bit padding. No resolved 18.6 core/contrib report group was found, so no specific bit-string conversion or message is confirmed.
-
dynamic_result_sets_returned
0100C names a warning-category dynamic-result-set condition. No resolved 18.6 core/contrib report group was found, so no server-side producer, result-set count, or message is confirmed.
-
deprecated_feature
PostgreSQL 18.6 emits 01P01 at WARNING severity when a password-setting operation produces or preserves an MD5 verifier. This is a deprecation notice attached to a command that can still proceed, not a generic failure code for every old feature.
-
no_data
02000 has confirmed 18.6 DEBUG1/DEBUG2 paths in contrib/amcheck/verify_nbtree.c for internal index-check conditions. The three groups detailed below are each DEBUG1; they are not the same as a normal query returning zero rows and are not a generic c…
-
no_additional_dynamic_result_sets_returned
02001 is a no-data-category condition about additional dynamic result sets, not about an ordinary query returning no rows. No resolved 18.6 core/contrib report group was found.
-
sql_statement_not_yet_complete
03000 is an error-category condition whose name indicates that the SQL statement is not yet complete. No resolved 18.6 core/contrib report group was found, so this page does not assign a parser, protocol, or client source.
-
connection_exception
SQLSTATE 08000 is connection_exception in Class 08. Connection exception is a broad connection-management condition. In the fixed PostgreSQL paths it is used by postgres_fdw when an abort-cleanup failure makes a foreign-server connection unusable; a…
-
sqlclient_unable_to_establish_sqlconnection
SQLSTATE 08001 is sqlclient_unable_to_establish_sqlconnection in Class 08. 08001 is the server-side SQLSTATE for a client connection that could not be established. In the selected dblink_connect path the ERROR primary is could not establish connecti…
-
connection_does_not_exist
SQLSTATE 08003 is connection_does_not_exist in Class 08. 08003 identifies a missing named connection handle in the current dblink backend session. It is a handle-lifecycle error, not evidence that the remote server is down (08001) or that an establi…
-
sqlserver_rejected_establishment_of_sqlconnection
SQLSTATE 08004 is sqlserver_rejected_establishment_of_sqlconnection in Class 08. 08004 is the SQL-standard name for a server-rejected connection establishment. The fixed PostgreSQL 18.6 and 10.23 core-call scans contain no resolved PostgreSQL erepor…
-
connection_failure
SQLSTATE 08006 is connection_failure in Class 08. 08006 names failure of an established connection. The fixed paths include postgres_fdw cancel/connection-loss handling and COPY failure handling; they do not define one universal primary or severity,…
-
transaction_resolution_unknown
SQLSTATE 08007 is transaction_resolution_unknown in Class 08. 08007 names an unknown transaction resolution. The fixed PostgreSQL 18.6 and 10.23 call scans contain no resolved core throw site for it.
-
protocol_violation
SQLSTATE 08P01 is protocol_violation in Class 08. 08P01 means that a frontend/backend protocol message violated the wire contract. The selected raw TCP case completes startup and observes ReadyForQuery (Z), sends an unknown frontend byte Y in a vali…
-
triggered_action_exception
SQLSTATE 09000 is an ERROR-level triggered-action condition. In the fixed PostgreSQL 18.6 scan, resolved report paths are in contrib/spi trigger functions: they validate trigger arguments, target-column types, referenced tuples, and SPI return codes…
-
feature_not_supported
SQLSTATE 0A000 is feature_not_supported in Class 0A. 0A000 means a recognized feature or option is unsupported in the selected context. The selected hash-index path requests id ASC, reports access method "hash" does not support ASC/DESC options, the…
-
invalid_transaction_initiation
SQLSTATE 0B000 names the SQL-standard Invalid Transaction Initiation class. The locked PostgreSQL 18.6 definition contains the condition, but the resolved core/contrib call scan did not identify a PostgreSQL report group for this code. Treat the cla…
-
locator_exception
SQLSTATE 0F000 is the Locator Exception class. It is a category code, not a concrete locator failure message. The PostgreSQL 18.6 definition is present, but the locked core/contrib scan did not resolve a 0F000 report group. A client, embedded-SQL la…
-
invalid_locator_specification
SQLSTATE 0F001 is the Invalid Locator Specification member of Class 0F. The locked PostgreSQL definition records the SQL-standard identity, but the resolved PostgreSQL 18.6 core/contrib scan did not find an emitting call. Do not turn the condition n…
-
invalid_grantor
SQLSTATE 0L000 is invalid_grantor in Class 0L. The fixed aclparse path uses it as a backward-compatible warning when old ACL item text omits the /grantor suffix: it defaults the grantor to BOOTSTRAP_SUPERUSERID. This is ACL text parsing, not a boots…
-
invalid_grant_operation
SQLSTATE 0LP01 is invalid_grant_operation in Class 0L. 0LP01 means that the GRANT or REVOKE operation is invalid for the object or privilege. The selected sequence case asks for INSERT, which is rejected with the dynamically assembled primary invali…
-
invalid_role_specification
SQLSTATE 0P000 is invalid_role_specification in Class 0P. Under ENABLE_SSPI, the fixed Windows SSPI path uses it for server LOG branches while converting a SAM account name to a UPN; it is not a generic missing-role login result or a client ErrorRes…
-
diagnostics_exception
SQLSTATE 0Z000 is the Diagnostics Exception category. In PostgreSQL's fixed source, the concrete PL/pgSQL path is the member 0Z002; the category row itself is not a separate report group. Use 0Z000 to classify an observed diagnostics member, then ke…
-
stacked_diagnostics_accessed_without_active_handler
SQLSTATE 0Z002 is emitted by PL/pgSQL when code tries to use stacked exception state without the active exception handler that owns it. PostgreSQL 18.6 has two confirmed paths: GET STACKED DIAGNOSTICS cannot be used outside an exception handler and …
-
invalid_argument_for_xquery
SQLSTATE 10608 is an ERROR-level XQuery-class condition for an invalid argument. PostgreSQL 18.6 has resolved backend XML paths for an empty XPath expression, an empty row path filter, and an empty column path filter. The contrib/xml2 sources also r…
-
case_not_found
SQLSTATE 20000 is raised by PL/pgSQL for a CASE statement that reaches no matching WHEN and has no ELSE. PostgreSQL 18.6 reports case not found with hint CASE statement is missing ELSE part. The condition is about the procedural CASE statement path;…
-
cardinality_violation
21000 means that an operation received the wrong number of rows for its cardinality contract. The common user-visible case is a scalar subquery that returns more than one row. It is different from 23505: no unique index conflict is required.
-
data_exception
22000 is dataexception. The fixed arrayappend path accepts an empty or one-dimensional array argument and reports the dimensionality requirement otherwise; other Data Exception paths belong to their own subsystem.
-
string_data_right_truncation
22001 is stringdataright_truncation. The fixed varchar path reports the declared character width, while hstore and varbit have separate variants.
-
null_value_no_indicator_parameter
22002 is nullvaluenoindicatorparameter, an ECPG-oriented condition. The fixed 18.6 call archive has no resolved native report group in this scan.
-
numeric_value_out_of_range
22003 is numericvalueoutofrange. Fixed paths cover integer conversion, numeric overflow, and subsystem-specific range checks; the page centers on numeric conversion and preserves those boundaries.
-
null_value_not_allowed
22004 is nullvaluenot_allowed. The fixed table-function path rejects a null namespace URI; many other extensions and core functions use the same condition for different null contracts.
-
error_in_assignment
22005 is errorinassignment. The fixed PL/pgSQL path reports assignment to a variable declared CONSTANT; ECPG and other assignment layers may have separate boundaries.
-
invalid_datetime_format
22007 is invaliddatetimeformat. The fixed interval-formatting path reports an invalid format specification and explains that intervals are not tied to specific calendar dates.
-
datetime_field_overflow
22008 is datetimefieldoverflow. Fixed date.c paths report out-of-range date values, date fields, and time fields; the exact message identifies which conversion or operation failed.
-
invalid_time_zone_displacement_value
22009 is invalidtimezonedisplacementvalue. The fixed timetz_recv binary-input path rejects a GMT displacement outside the supported range.
-
escape_character_conflict
2200B is escapecharacterconflict. The fixed 18.6 call archive has no resolved native report group in this scan.
-
invalid_use_of_escape_character
The SQL SIMILAR TO pattern translator rejected its escape-double-quote structure before matching. PostgreSQL 18.6 has a concrete regexp.c path that raises SQL regular expression may not contain more than two escape-double-quote separators; this is a…
-
invalid_escape_octet
The catalogue condition covers an invalid escape octet. The fixed scan did not resolve a PostgreSQL 18.6 emitting function for this entry, so the condition is useful as a classification boundary rather than proof of one native parser call.
-
zero_length_character_string
The condition identifies an operation that rejects an empty character string. In the fixed fuzzystrmatch path, metaphone returns empty text immediately for empty input; only after that early return does it read reqlen, and a non-positive requested o…
-
most_specific_type_mismatch
This condition names a most-specific-type mismatch during type resolution. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded call scan, so the page stays conditional and does not turn a generic cast or operator error into 2200G.
-
sequence_generator_limit_exceeded
A sequence allocation reached its configured limit while trying to obtain the next value. PostgreSQL 18.6’s sequence.c path reports source templates for both maximum and minimum limits. The endpoint value itself can be legal, and the numeric value u…
-
not_an_xml_document
The SQL/XML SQLSERIALIZE DOCUMENT operation received input that could not satisfy the requested document form. PostgreSQL 18.6 maps this public DOCUMENT path through xmltotextwithoptions with XMLOPTION_DOCUMENT; a failed or soft parse is mapped to n…
-
invalid_xml_document
This catalogue member denotes an invalid XML document. PostgreSQL 18.6 has a core xml_parse document branch that reports invalid XML document, and the contrib/xml2 XSLT path reports the same SQLSTATE for a failed source document or stylesheet parse.…
-
invalid_xml_content
This member covers invalid XML content. PostgreSQL 18.6’s core XML parser has a content-mode declaration guard and content-parse guards that report 2200N; the original XML option determines whether a document parse failure is instead reported as 220…
-
invalid_xml_comment
An XML comment is invalid. PostgreSQL 18.6’s xmlcomment path reports invalid XML comment when the comment text contains the forbidden -- sequence or ends in -; this is comment-specific XML syntax rather than a general document failure.
-
invalid_xml_processing_instruction
An XML processing instruction violates its XML syntax. PostgreSQL 18.6’s xmlpi path rejects a target whose name is case-insensitively xml, or a non-NULL body containing ?>; both guards report invalid XML processing instruction with a branch-specific…
-
invalid_indicator_parameter_value
An indicator parameter value does not satisfy the indicator or descriptor rules of the operation consuming it. The fixed PostgreSQL 18.6 catalogue confirms the condition, but the bounded source scan does not bind it to a native emitter, message temp…
-
substring_error
A text substring path received an invalid explicit length. In fixed PostgreSQL 18.6 code, text_substring reports negative substring length not allowed with SQLSTATE 22011.
-
division_by_zero
A division or modulo operation reached a zero divisor. PostgreSQL 18.6 uses SQLSTATE 22012 in numeric, integer, floating-point, money, and interval-division paths, while each path keeps its own operand and special-value rules.
-
invalid_preceding_or_following_size
A window-frame offset is negative in a fixed ROWS or GROUPS executor path. PostgreSQL 18.6 reports either frame starting offset must not be negative or frame ending offset must not be negative with SQLSTATE 22013.
-
invalid_argument_for_ntile_function
ntile received a non-positive bucket count. The fixed window-function path reports argument of ntile must be greater than zero with SQLSTATE 22014.
-
interval_field_overflow
An interval input field exceeds the range accepted by the interval decoder. PostgreSQL 18.6 maps that datetime parsing condition to SQLSTATE 22015; later interval construction or arithmetic can use different range codes.
-
invalid_argument_for_nth_value_function
nthvalue received a non-positive ordinal. The fixed window-function path reports argument of nthvalue must be greater than zero with SQLSTATE 22016.
-
invalid_character_value_for_cast
A character value is rejected by the conversion requested by an operation. The fixed PostgreSQL 18.6 catalogue confirms invalidcharactervalueforcast, but the bounded source scan does not bind this entry to one native emitter or message template.
-
invalid_escape_character
An operation rejected its escape argument. The fixed catalogue defines invalidescapecharacter, but the bounded PostgreSQL 18.6 source scan found no native emitter to which one message or severity can safely be attached.
-
invalid_regular_expression
SQL regular-expression compilation and execution have separate 2201B paths, and HBA/ident configuration handling uses the same code with log-level reporting. The fixed messages and severities must be read by owner rather than merged into one generic…
-
invalid_argument_for_logarithm
Logarithm functions reject zero and negative inputs at their defined-domain guards. Fixed float paths report cannot take logarithm of zero or cannot take logarithm of a negative number; numeric ln and base-log paths apply the same SQLSTATE while han…
-
invalid_argument_for_power_function
Power functions reject operands whose real-valued result is undefined. Fixed numeric paths report zero raised to a negative power is undefined or a negative number raised to a non-integer power yields a complex result.
-
invalid_argument_for_width_bucket_function
width_bucket validates its bucket count, NaN inputs, histogram bounds, and bound equality. The fixed numeric and float8 paths report distinct 2201G messages for non-positive count, NaN, non-finite bounds, and equal bounds.
-
invalid_row_count_in_limit_clause
A LIMIT or FETCH row count fails a form-specific guard. Fixed paths report LIMIT must not be negative; the parser separately rejects a literal NULL row count in FETCH FIRST ... WITH TIES.
-
invalid_row_count_in_result_offset_clause
An OFFSET expression is negative after evaluation. The fixed executor path reports OFFSET must not be negative.
-
invalid_limit_value
invalid limit value
-
character_not_in_repertoire
A source byte sequence is invalid for the encoding being checked. The fixed conversion path reports invalid byte sequence for encoding "%s": %s and formats the offending bytes.
-
indicator_overflow
The catalogue condition names an indicator value that cannot fit its interface representation. The bounded PostgreSQL 18.6 source review confirms the definition but does not bind a native emitting report group.
-
invalid_parameter_value
A named parameter, option, descriptor, or function argument is outside the domain accepted by its owner. Fixed representatives cover built-in GUC parsing, amcheck descriptors/options, postgres_fdw option validation, and regular-expression option che…
-
unterminated_c_string
The catalogue condition names a C-style string that ended before its required terminator. The bounded PostgreSQL 18.6 source review confirms the definition but does not bind a native emitting report group.
-
invalid_escape_sequence
An escape sequence is invalid for its specific consumer. Fixed paths distinguish a LIKE escape argument that is not empty or one character, a LIKE pattern ending in an escape character, a regular-expression translation escape argument with the same …
-
string_data_length_mismatch
A bit-string value has the wrong declared length. The fixed varbit.c path reports bit string length %d does not match type bit(%d); bitwise operands have separate mismatch messages.
-
trim_error
The trim operation rejected its argument or trim specification. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded scan.
-
array_subscript_error
2202E is PostgreSQL's arraysubscripterror condition in Class 22, Data Exception. The directory keeps ERRCODEARRAYELEMENTERROR as a compatibility alias and uses ERRCODEARRAYSUBSCRIPTERROR for the named condition. Both macros encode the same SQLSTATE.
-
invalid_tablesample_repeat
The TABLESAMPLE REPEATABLE seed is invalid when it is NULL. The fixed executor path reports TABLESAMPLE REPEATABLE parameter cannot be null.
-
invalid_tablesample_argument
A TABLESAMPLE method received an invalid argument. Fixed core and contrib methods reject out-of-range percentages or negative sample sizes with method-specific messages.
-
duplicate_json_object_key_value
A JSON object construction encountered a duplicate key. The fixed unique-key JSON builder and aggregate paths report duplicate JSON object key value: %s; JSONB finalization has a related variant.
-
invalid_argument_for_sql_json_datetime_function
A SQL/JSON datetime method received an invalid type, precision, or format. Fixed jsonpath execution reports an unrecognized format and hints to use a datetime template argument.
-
invalid_json_text
JSON text is invalid for the consuming operation. No fixed 18.6 emitting report group was resolved in the bounded scan.
-
invalid_sql_json_subscript
A SQL/JSON array subscript is invalid. Fixed jsonpath paths distinguish out-of-bounds, non-single-numeric, and integer-range variants.
-
more_than_one_sql_json_item
A SQL/JSON query returned more than one item where the operation requires one. Fixed JSONQUERY/JSONVALUE paths report single-item or single-scalar requirements and may hint to use WITH WRAPPER.
-
no_sql_json_item
A SQL/JSON path found no item for the requested operation. Fixed expression execution reports no SQL/JSON item found for specified path.
-
non_numeric_sql_json_item
A JSON path item method received a value that cannot satisfy its numeric or conversion contract. The fixed paths cover .number(), .decimal(), .integer(), .bigint(), .double(), .boolean(), .abs(), .floor(), .ceiling(), and the corresponding type chec…
-
non_unique_keys_in_a_json_object
The locked condition names a non-unique-key error for a JSON object. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded scan.
-
singleton_sql_json_item_required
A SQL/JSON path operation expected one result of a required type, but received another cardinality or type. The fixed paths cover a singleton boolean result and the two numeric operands of binary jsonpath arithmetic; the SQL function and the @@ oper…
-
sql_json_array_not_found
An array-only JSON path accessor or item method reached a non-array item without permitted auto-wrap or structural-error suppression. Fixed wildcard, indexed, and .size() paths expose separate array-type primaries; an out-of-bounds subscript is 2203…
-
sql_json_member_not_found
A named JSON object member cannot be read from the current item. Fixed jsonpath member access distinguishes a missing key from a non-object receiver.
-
sql_json_number_not_found
A unary jsonpath arithmetic operator needs a numeric operand but receives another item type. This is the unary-operator boundary, separate from numeric conversion methods.
-
sql_json_object_not_found
An object-only JSON path accessor or .keyvalue() method received a non-object item. Wildcard member access and object key/value expansion use this structural guard.
-
too_many_json_array_elements
The locked condition names an excessive number of JSON array elements. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded scan.
-
too_many_json_object_members
The locked condition names an excessive number of JSON object members. No fixed PostgreSQL 18.6 emitting path was resolved in the bounded scan.
-
sql_json_scalar_required
A JSON_VALUE operation received one item, but that item was not a scalar. Multiple items are handled earlier as 22034; empty results are handled by the empty/ON EMPTY path.
-
sql_json_item_cannot_be_cast_to_target_type
2203G is the catalogue condition sqljsonitemcannotbecasttotargettype. In the fixed PostgreSQL 18.6 tree, the bounded search found its macro in errcodes.txt but no core or contrib call that emits it. This is therefore a definition-only reference; a J…
-
floating_point_exception
PostgreSQL's fixed core path installs FloatExceptionHandler for SIGFPE. The handler emits an ERROR with primary floating-point exception and detail stating that an invalid floating-point operation was signaled, probably because of an out-of-range re…
-
invalid_text_representation
22P02 means a text input routine cannot interpret a value as the requested type. This page selects the ordinary integer input path and also marks the COPY/text boundary; COPY, enum, extension, and contrib callers can use different primary messages.
-
invalid_binary_representation
22P03 is PostgreSQL's invalid-binary-representation boundary. In the fixed source it covers binary COPY fields, extended-protocol Bind parameters, fast-path function arguments, logical-replication columns, and guards inside representative type recei…
-
bad_copy_file_format
22P04 is the COPY file-format boundary. The fixed parser uses it for binary signatures and headers, text or CSV framing, header/row field counts, and malformed binary field lengths. It is a structural COPY error, not a generic synonym for a value th…
-
untranslatable_character
PostgreSQL could identify a source character but could not represent it in the destination encoding. The fixed helper reports the offending bytes and both encoding names with primary character with byte sequence %s in encoding "%s" has no equivalent…
-
nonstandard_use_of_escape_character
The SQL scanner found a backslash escape form that is nonstandard or unsafe under the current string-literal settings. PostgreSQL 18.6 has one ERROR branch for unsafe quote escaping and three WARNING branches for backslash-quote, backslash-backslash…
-
integrity_constraint_violation
23000 names the Class 23 integrity-constraint umbrella. It is a protocol category, not a reliable substitute for a concrete PostgreSQL constraint error. Use the exact five-character code returned by the server.
-
restrict_violation
23001 is the specific RESTRICT violation condition. In the selected PostgreSQL 18.6 case, deleting a referenced parent row raised it with the child constraint and key in the diagnostic. PostgreSQL 10 reported the same tested operation through 23503,…
-
not_null_violation
23502 means a NULL reached a NOT NULL rule. The selected case identifies column label and relation items; the exact PG18 and PG10 primary messages differ slightly in relation wording, while the SQLSTATE and structured object identity agree.
-
foreign_key_violation
23503 is PostgreSQL's foreignkeyviolation condition in Class 23, integrityconstraintviolation. A child insert or update without a matching parent key, or an ordinary parent key action covered by the foreign-key rules, can produce it. In PostgreSQL 1…
-
unique_violation
23505 is PostgreSQL's unique_violation condition. A row, an index build, or a logical-apply operation found a value that cannot coexist with an enforced unique invariant.
-
check_violation
23514 means a CHECK or related row constraint evaluated as false. The selected named constraint is amount_positive; the server reports the table and constraint and the invalid row detail.
-
exclusion_violation
23P01 means an exclusion constraint found an existing row for which all configured comparison operators conflict. The selected range case uses &&, so it rejects an overlap rather than merely a duplicate value.
-
invalid_cursor_state
24000 means the cursor or portal state does not satisfy the operation. The selected CURRENT OF case declares a valid cursor but tries to update before FETCH has positioned it, producing “cursor ... is not positioned on a row”.
-
invalid_transaction_state
25000 is the broad Class 25 invalid transaction state. The locked 18.6 source uses it for internal states such as executing a utility or defining a savepoint during a parallel operation. This batch does not claim a safe ordinary SQL reproduction.
-
active_sql_transaction
25001 means the command requires a transaction boundary that the current session violates. The selected case runs VACUUM after BEGIN, receives the exact active-transaction error, rolls back, and then successfully runs VACUUM outside the transaction …
-
branch_transaction_already_active
25002 names a branch transaction that is already active. It is narrower than 25001 and separate from 25P02; this page records the locked condition definition and the absence of a resolved core 18.6 call site.
-
inappropriate_access_mode_for_branch_transaction
25003 is the SQLSTATE name for an inappropriate access mode in a branch transaction. The fixed PostgreSQL 18.6 core scan resolves no direct report site, so this entry documents the definition boundary without inventing an ordinary SQL trigger.
-
inappropriate_isolation_level_for_branch_transaction
25004 names an inappropriate isolation level for a branch transaction. The fixed PostgreSQL 18.6 resolved-call scan has no direct report group for this code, so no ordinary SQL reproduction is claimed.
-
no_active_sql_transaction_for_branch_transaction
25005 is the branch-transaction form of a no-active-SQL-transaction condition. It is distinct from 25P01, and the fixed PostgreSQL 18.6 core scan does not resolve a natural server call site.
-
read_only_sql_transaction
25006 is returned when a command would write in a read-only transaction. The selected case issues CREATE TABLE after SET TRANSACTION READ ONLY, observes INERROR, rolls back, and creates the table after leaving the read-only block.
-
schema_and_data_statement_mixing_not_supported
25007 names a transaction-state condition for mixing schema and data statements. The fixed PostgreSQL 18.6 core scan resolves no direct report group, so this page does not manufacture a SQL example.
-
held_cursor_requires_same_isolation_level
25008 is reserved for a held cursor whose transaction isolation level is not compatible with the required operation. The fixed PostgreSQL 18.6 core scan has no direct report group for it.
-
no_active_sql_transaction
25P01 reports that an operation needs an active SQL transaction. The selected case sends SAVEPOINT with autocommit enabled, receives the exact error while the session remains IDLE, then repeats the operation inside BEGIN and commits.
-
in_failed_sql_transaction
25P02 is usually the second diagnostic, not the root cause. In the selected case a duplicate key first returns 23505; a following SELECT is rejected with 25P02 while the block remains INERROR. ROLLBACK is required before a valid retry.
-
idle_in_transaction_session_timeout
25P03 is a FATAL session-termination condition. It fires when a session is waiting for the next client query inside an open transaction longer than the effective idleintransactionsessiontimeout. The selected case uses 300 ms as a harness trigger, no…
-
transaction_timeout
25P04 is a FATAL condition emitted by transaction_timeout, which covers both an explicit BEGIN transaction and an implicitly started single-statement transaction. The selected 18.6 case uses 300 ms; PG10 is a source/version preflight skip because th…
-
invalid_sql_statement_name
26000 means that PostgreSQL was asked to use a named prepared statement that does not exist in the current backend session. It is a session-resource lookup failure, so first check session affinity and statement lifecycle before changing the SQL text.
-
triggered_data_change_violation
27000 is a source-confirmed trigger-protection condition. PostgreSQL raises it when a row has already been changed by an operation triggered by the current command; the fixed 18.6 source hint points toward using an AFTER trigger when the intent is t…
-
invalid_authorization_specification
SQLSTATE 28000 is invalid_authorization_specification in Class 28. 28000 is the authorization-specification class for rejected startup or authorization context. The selected missing-role startup path sends C=28000, S=FATAL, and role "<generated>" do…
-
invalid_password
28P01 is PostgreSQL's invalidpassword condition in Class 28, invalidauthorizationspecification. It identifies a password authentication failure while a client is establishing a session. The authentication method, the matched pghba.conf rule, and the…
-
dependent_privilege_descriptors_still_exist
2B000 is a catalogue-defined condition for dependent privilege descriptors. The fixed source scan did not resolve a distinct core 2B000 ereport path in this batch, so the page records the definition boundary and does not label a role, REVOKE, or DRO…
-
dependent_objects_still_exist
2BP01 means a DROP or related catalog operation would remove an object that other database objects still require. The useful repair is dependency-aware: identify the dependent object, decide whether it should be removed or retained, and only then re…
-
invalid_transaction_termination
2D000 is the SPI guard used when a procedure or subtransaction context attempts an invalid transaction termination. The fixed 18.6 path distinguishes invalid termination from a normal explicit COMMIT; this batch does not claim that every procedure-l…
-
sql_routine_exception
SQLSTATE 2F000 is the SQL Routine Exception category. The definition is present in the locked catalogue, but the resolved PostgreSQL 18.6 core/contrib call scan did not identify a native 2F000 report group. The class should therefore organize routin…
-
modifying_sql_data_not_permitted
SQLSTATE 2F002 names the standard SQL Routine Exception member for modifying SQL data when the routine’s declared data-access contract does not permit it. The locked PostgreSQL 18.6 definition contains the member, but its resolved core/contrib call …
-
prohibited_sql_statement_attempted
The fixed scan confirms this ERROR in both dblink and postgres_fdw connection paths. dblink also reports it when a command would return rows where the dblink API expects no result. The authentication variants are wrapper/connection policy paths, not…
-
reading_sql_data_not_permitted
The catalogue defines this standard member, but the resolved PostgreSQL 18.6 core/contrib scan found no native report group. Do not infer a PostgreSQL function volatility or language rule from the condition name.
-
function_executed_no_return_statement
PL/pgSQL reports 2F005 at ERROR level when a function or trigger procedure reaches the end without the required RETURN. The fixed 18.6 paths distinguish an ordinary function from a trigger procedure in their messages.
-
invalid_cursor_name
34000 means that a cursor or portal name cannot be resolved in the current backend session. A cursor that was closed, declared on another pooled connection, or ended with its transaction is not the same resource as a cursor with a bad position (2400…
-
external_routine_exception
Class 38 is broad. Fixed PostgreSQL 18.6 paths include external command failures in COPY ... PROGRAM and basebackuptoshell, UUID library failures, and exceptions propagated from PL/Perl, PL/Python, and PL/Tcl. These are separate implementations unde…
-
containing_sql_not_permitted
The fixed definition records this Class 38 member, but the resolved PostgreSQL 18.6 core/contrib scan found no report group for it. It is a standard routine boundary condition, not a confirmed PostgreSQL message.
-
modifying_sql_data_not_permitted
This Class 38 member names a modifying-data restriction. The fixed PostgreSQL 18.6 core/contrib scan found no resolved report group for it, so it must not be conflated with the separately named 2F002 member.
-
prohibited_sql_statement_attempted
The Class 38 member is defined, but no resolved PostgreSQL 18.6 core/contrib report group was found. It is distinct from Class 2F member 2F003 even though the condition names match.
-
reading_sql_data_not_permitted
The Class 38 member is a standard reading-data restriction, but the bounded PostgreSQL 18.6 core/contrib scan found no resolved report group. It should remain separate from 2F004.
-
external_routine_invocation_exception
Fixed PostgreSQL 18.6 paths in contrib/pgcrypto report this ERROR for cryptographic library failures and invalid input lengths. The category can also carry other external routine invocation errors, so the exact library function and dynamic error tex…
-
invalid_sqlstate_returned
The fixed definition contains this member, but the resolved PostgreSQL 18.6 core/contrib scan found no report group. The name describes an external routine returning an invalid SQLSTATE; it does not identify a current PostgreSQL handler path.
-
null_value_not_allowed
39004 is nullvaluenot_allowed. The fixed definition is present, but the bounded PostgreSQL 18.6 call archive has no resolved report group for this code; diagnose the actual routine or extension boundary before assigning an operation.
-
trigger_protocol_violated
39P01 is triggerprotocolviolated. Fixed PostgreSQL 18.6 paths cover the core trigger manager, contrib/tcn checks, and PL/Perl trigger return handling, with path-specific messages and severity.
-
srf_protocol_violated
39P02 is srfprotocolviolated. The fixed executor path checks value-per-call and materialize set-returning-function contracts and reports the exact violated return mode.
-
event_trigger_protocol_violated
39P03 is eventtriggerprotocolviolated. Fixed event-trigger helpers reject calls outside their required sqldrop, table_rewrite, or event-trigger function context.
-
savepoint_exception
3B000 is the savepoint-exception class definition. The fixed core call scan resolves the more specific 3B001 missing-savepoint path rather than a separate generic 3B000 throw site. Use the concrete server SQLSTATE when diagnosing a savepoint failure…
-
invalid_savepoint_specification
3B001 means that a savepoint operation named a savepoint that is absent at the current transaction level. It is different from 25P01, which means there is no active transaction block at all.
-
invalid_catalog_name
SQLSTATE 3D000 is invalid_catalog_name in Class 3D. 3D000 identifies an invalid database/catalog name. It can occur before startup completes when a requested database is absent, and fixed dbcommands.c paths also emit it while a SQL command resolves …
-
invalid_schema_name
SQLSTATE 3F000 is invalid_schema_name in Class 3F. 3F000 means a schema name cannot be resolved in an established session. The selected qualified-table path receives schema "<generated>" does not exist, while fixed namespace and schema-command paths…
-
transaction_rollback
40000 is an umbrella transaction-rollback condition. The fixed 18.6 source contains an internal system-catalog-scan path with transaction aborted during system catalog scan; reproducing that path would require an internal fault or visibility conditi…
-
serialization_failure
40001 is PostgreSQL's serializationfailure condition in Class 40, transactionrollback. It tells the client that the transaction's observed ordering cannot be serialized with a concurrent transaction. PostgreSQL aborts the conflicting transaction so …
-
transaction_integrity_constraint_violation
40002 is a catalogue-defined transaction-integrity condition. No distinct PostgreSQL core 40002 call site was resolved in the fixed scan used for this batch, so no foreign-key, unique, or other concrete constraint error is relabeled as this umbrella…
-
statement_completion_unknown
40003 describes uncertainty about statement completion, generally a reconciliation problem at a connection or protocol boundary. The fixed core scan did not provide a safe SQL-only natural trigger for this batch. A client timeout or a fabricated RAI…
-
deadlock_detected
40P01 is PostgreSQL's deadlockdetected condition in Class 40, transactionrollback. It means that the lock manager found a cycle in which transactions are waiting for one another, so PostgreSQL chose a victim and aborted its transaction.
-
syntax_error_or_access_rule_violation
SQLSTATE 42000 is syntax_error_or_access_rule_violation in Class 42. 42000 is the broad syntax-error-or-access-rule umbrella. This batch keeps it as a definition boundary because fixed PostgreSQL paths report concrete child codes such as 42501 and 4…
-
insufficient_privilege
SQLSTATE 42501 is insufficient_privilege in Class 42. 42501 is insufficient privilege. The selected natural path calls nextval on a runner-owned sequence from a separate role that has schema USAGE but no sequence USAGE; PostgreSQL reports permission…
-
syntax_error
SQLSTATE 42601 is syntax_error in Class 42. 42601 is a syntax error. The selected parser path rejects LIMIT 1, 2 with primary LIMIT #,# syntax is not supported and hint Use separate LIMIT and OFFSET clauses.
-
invalid_name
SQLSTATE 42602 is invalid_name in Class 42. 42602 is an invalid name. The selected enum path rejects a 64-byte label with primary invalid enum label "%s" and a length detail; a short label can be added afterwards.
-
invalid_column_definition
SQLSTATE 42611 is invalid_column_definition in Class 42. 42611 is an invalid column definition. Two inherited parents in the selected case define different defaults for id; the child definition fails with column "%s" inherits conflicting default val…
-
name_too_long
SQLSTATE 42622 is name_too_long in Class 42. 42622 is nametoolong. Fixed source paths include a scanner NOTICE for an overlong SQL identifier and a binary name receive ERROR; ordinary text input can truncate without either diagnostic.
-
duplicate_column
SQLSTATE 42701 is duplicate_column in Class 42. 42701 is duplicate_column. The selected CREATE TABLE path lists id twice and reports column "%s" specified more than once before a repaired table with distinct columns is created.
-
ambiguous_column
SQLSTATE 42702 is ambiguous_column in Class 42. 42702 is ambiguous_column. The selected join exposes id from two real tables and an unqualified SELECT id reports column reference "%s" is ambiguous.
-
undefined_column
SQLSTATE 42703 is undefined_column in Class 42. 42703 is undefinedcolumn. The selected query names missingcolumn on a real table and reports column "%s" does not exist; selecting the defined id then succeeds.
-
undefined_object
SQLSTATE 42704 is undefined_object in Class 42. 42704 is undefined_object. The selected DROP TRIGGER path names a trigger absent from a real table and reports trigger "%s" for table "%s" does not exist; a real trigger can then be created and dropped.
-
duplicate_object
42710 is duplicate_object: a definition collides with an occupied object name. The selected path is a second CREATE TYPE ... AS ENUM; the same SQLSTATE is reused by other object-definition paths, so first identify the object kind and schema.
-
duplicate_alias
42712 is duplicate_alias: a query namespace assigns the same table alias more than once. The parser rejects two VALUES range-table entries named duplicate_alias.
-
duplicate_function
42723 is duplicate_function: a function definition repeats the same schema, name, and input argument types. Output types do not create another overload.
-
ambiguous_function
42725 is ambiguous_function: lookup found multiple viable candidates but no best one. The case defines uuid and jsonb overloads and passes an unknown string literal.
-
grouping_error
42803 is grouping_error: a grouped query projects a value that is neither grouped nor aggregated. The case groups category while selecting label.
-
datatype_mismatch
42804 is datatype_mismatch: an expression or definition has a type different from its target context. The selected path rejects a text default for an integer column.
-
wrong_object_type
42809 is wrong_object_type: a command is valid in general but not for the selected object kind. The case tries a row-level BEFORE trigger on a view.
-
invalid_foreign_key
42830 is invalid_foreign_key: an FK definition cannot find a qualifying unique key on referenced columns. The case references a parent integer column with no unique constraint.
-
cannot_coerce
42846 is cannot_coerce: no applicable cast connects the source and target types. The selected expression asks for integer to date.
-
undefined_function
42883 is undefined_function: lookup found no compatible function for the requested name and input types. The same condition is also used by the parser's undefined-operator branch. The case calls a schema-qualified integer function signature before i…
-
generated_always
428C9 (generated_always) is a rewrite-stage ERROR when an INSERT or UPDATE supplies a value where PostgreSQL must generate it or receive DEFAULT. Identity columns and generated columns follow different assignment rules, so the operation and column m…
-
reserved_name
42939 (reserved_name) rejects a name under an object-specific PostgreSQL rule. The selected 18.6 paths cover schemas, tablespaces, role creation, and role-specification grammar; the object named in the message determines which rule fired.
-
undefined_table
42P01 is PostgreSQL's undefinedtable condition in Class 42, syntaxerrororaccessruleviolation. The name is historical: the failing reference can be a table, view, materialized view, foreign table, or another relation name that the parser cannot resol…
-
undefined_parameter
42P02 (undefined_parameter) is a parse-time ERROR because a positional marker such as $1 is outside the parameter set known to parse analysis. It differs from a Bind-message count violation (08P01) and from 42P08, where a known parameter cannot rece…
-
duplicate_cursor
42P03 (duplicate_cursor) reports a cursor/portal name collision, but the same SQLSTATE covers an ERROR, a replacement WARNING, and a PL/pgSQL-specific active-cursor ERROR. The caller and the CreatePortal options determine which behavior occurred.
-
duplicate_database
42P04 (duplicate_database) means a database-management path found the requested name already in the cluster. It is a cluster-level name check, not a relation collision in the current database, and the CREATE and RENAME callers have different surroun…
-
duplicate_prepared_statement
42P05 (duplicate_prepared_statement) means the current backend/session already has a named prepared statement with that name. Pool reuse can expose this state from an earlier request, while a different connection can have a separate statement of the…
-
duplicate_schema
42P06 (duplicate_schema) is a schema-definition collision. Plain CREATE SCHEMA errors; IF NOT EXISTS can emit NOTICE and continue, but that conditional path only skips creation and does not reconcile the existing schema.
-
duplicate_table
42P07 (duplicate_table) covers relation-name collisions, conditional skips, and inheritance graph checks. Identify the operation before repairing it.
-
ambiguous_parameter
42P08 (ambiguous_parameter) means a parameter marker exists, but parse analysis cannot make its type consistent or specific enough. The exact SQLSTATE and parser branch matter because similar primary text can be emitted by a different condition.
-
ambiguous_alias
42P09 (ambiguous_alias) is a parser ERROR when one visible table reference resolves to more than one relation namespace item. It occurs before execution and has separate named-alias and relation-OID paths.
-
invalid_column_reference
42P10 (invalid_column_reference) Column references can be rejected by the operation that consumes them.
-
invalid_cursor_definition
42P11 (invalid_cursor_definition) Cursor options and cursor plans have definition-time constraints.
-
invalid_database_definition
42P12 (invalid_database_definition) This condition names an invalid database definition, but its core emitter was not resolved in this scan.
-
invalid_function_definition
42P13 (invalid_function_definition) Function, aggregate, and trigger declarations can fail validation before execution.
-
invalid_prepared_statement_definition
42P14 (invalid_prepared_statement_definition) A PREPARE command can fail while defining the prepared statement itself.
-
invalid_schema_definition
42P15 (invalid_schema_definition) CREATE SCHEMA can be rejected when its schema declarations disagree.
-
invalid_table_definition
42P16 (invalid_table_definition) A table definition can violate partition-key, collation, or primary-key rules.
-
invalid_object_definition
42P17 (invalid_object_definition) Object definitions can conflict through inheritance, generated columns, or rewrite rules.
-
indeterminate_datatype
42P18 (indeterminate_datatype) Type inference fails when an expression or protocol parameter has no determinate type.
-
invalid_recursion
42P19 (invalid_recursion) Recursive query structure is checked before the recursive term can run.
-
windowing_error
42P20 (windowing_error) Window definitions constrain both calls and frame boundaries.
-
collation_mismatch
42P21 (collation_mismatch) Different collation choices meet where PostgreSQL requires one compatible result.
-
indeterminate_collation
42P22 (indeterminate_collation) An operation that needs one collation has no unambiguous collation to use.
-
with_check_option_violation
44000 means that a row written through a view would not satisfy that view's WITH CHECK OPTION predicate. It protects the view's write invariant; it is not the table-level CHECK condition 23514.
-
insufficient_resources
53000 is the broad insufficient-resources condition. Fixed 18.6 callers include background-worker startup, local-buffer exhaustion, and file-descriptor limits, so the message and startup/runtime phase identify the resource.
-
disk_full
53100 reports the explicit short-write branch of a file write. Fixed paths cover base-backup output and relation-file extension; the diagnostic names the file, partial byte count, requested count, and offset or block.
-
out_of_memory
53200 is PostgreSQL's out-of-memory condition. Fixed callers include ordinary memory-context allocation, shared-memory and lock-table capacity, extension/statistics-file loading, and WAL-reading processors. The useful diagnosis is the operation and …
-
too_many_connections
53300 is PostgreSQL's toomanyconnections condition in Class 53, insufficient_resources. It is emitted when a new backend cannot be admitted because a connection capacity limit has been reached. The representative case uses a role connection limit of…
-
configuration_limit_exceeded
53400 reports that a configured or finite process slot is exhausted. Fixed paths cover background workers, logical-replication workers, and replication-origin state slots.
-
program_limit_exceeded
54000 is used when a concrete program, representation, or extension limit is exceeded. Fixed examples include safe allocation-size arithmetic, relation block numbering, array dimensions/size, cube dimensions, and hstore pair counts; the source path …
-
statement_too_complex
54001 covers a statement that exceeds a planner, parser, or execution-stack limit. Fixed paths include the 4096 grouping-set ceiling and maxstackdepth enforcement.
-
too_many_columns
54011 reports that a physical tuple descriptor or a related object definition exceeds its fixed column limit. The source path determines whether the count is for table attributes, index keys plus INCLUDE columns, partition keys, statistics dimension…
-
too_many_arguments
54023 is the argument-count limit for functions, procedures, aggregates, and set-returning calls. Fixed paths protect catalog arrays, parser nodes, and executor FunctionCallInfo storage, and report the actual compile-time limit with plural-aware mes…
-
object_not_in_prerequisite_state
55000 means the requested operation lacks a required object or server state. This page selects the session-local sequence prerequisite behind currval; preload, recovery, and invalid-index paths are separate mechanisms.
-
object_in_use
55006 reports that the requested object operation conflicts with active use. This page selects a same-session cursor holding a table in an explicit transaction; database users, logical replication, and pending trigger-event branches are distinct.
-
cant_change_runtime_param
55P02 means that PostgreSQL rejected a runtime-parameter change because the GUC context or lifecycle phase does not permit that operation. The same condition name covers restart-only, SIGHUP-only, backend-start, internal, and binary-upgrade guards.
-
lock_not_available
55P03 reports that a requested lock could not be obtained under the operation's selected wait policy. Fixed paths cover row locks, relation locks, LOCK TABLE, lock_timeout, and maintenance commands that skip work.
-
unsafe_new_enum_value_usage
55P04 protects the commit-before-use rule for a newly added enum value. It is raised after PostgreSQL has found an enum tuple that is still uncommitted and marked as unsafe, not because the label has invalid syntax.
-
operator_intervention
57000 is the SQLSTATE Class 57 condition operator_intervention. The fixed 18.6 definition is present, but the bounded report/call scan did not resolve a core emitting call for this exact code. The page therefore keeps the mechanism, message, severit…
-
query_canceled
57014 is PostgreSQL's querycanceled condition in Class 57, operatorintervention. It indicates that the server interrupted a statement. The same SQLSTATE covers several cancellation sources, so the primary message and server context are needed to dis…
-
admin_shutdown
57P01 is a server-initiated administrative-shutdown condition. Fixed core paths cover orderly or immediate client termination, worker/parallel termination, and a synchronous-replication wait that explicitly says the transaction has already committed…
-
crash_shutdown
57P02 is the crash-shutdown path. When a crash-and-restart cycle is in progress, the backend sends a client-only WARNING describing the postmaster command to roll back and exit, then exits without running normal cleanup callbacks because shared memo…
-
cannot_connect_now
57P03 is emitted during connection startup when the database has not reached a connection-ready state. Fixed guards distinguish startup, shutdown, recovery, disabled hot standby, and two different not-yet-consistent recovery states.
-
database_dropped
57P04 is selected when a recovery conflict terminates a session because the connected database must be dropped. The same recovery-conflict primary is used for other conflict reasons, but those branches select 40001; the database-dropped guard is the…
-
idle_session_timeout
57P05 terminates a session after idlesessiontimeout expires while the backend is truly idle between commands. The fixed code starts this timer only in the no-transaction branch; idle-in-transaction has a separate condition and timer.
-
system_error
58000 is the system-error condition. In the fixed backend path, pg_promote creates the promotion signal file and then calls kill(PostmasterPid, SIGUSR1); a failed signal reports ERROR with the operating-system text substituted for %m.
-
io_error
58030 is emitted by a specific shared-buffer cleanup path after a write failure has already been recorded. In PostgreSQL 18.6 that path reports WARNING, not a generic client ERROR: it names the block and relation and says that repeated failure may b…
-
undefined_file
58P01 means that a required file or directory could not be found. In the fixed tablespace path, PostgreSQL distinguishes an ENOENT target during chmod from other permission or filesystem failures; the recovery hint is conditional on the server being…
-
duplicate_file
58P02 is the duplicate-file condition in the fixed server-side base-backup output path. The path accepts a missing directory, accepts an existing empty directory, and raises this code when the existing target is non-empty.
-
file_name_too_long
58P03 is selected by PostgreSQL's file-access errno helper when the saved OS errno is ENAMETOOLONG. It is not a standalone fixed primary such as file name too long: the caller supplies a %m message, and the helper supplies the SQLSTATE.
-
snapshot_too_old
72000 is a historical snapshottooold error. PostgreSQL 16.15 still defines and emits it; the SQLSTATE was removed in the PostgreSQL 17 major line. PostgreSQL 16.15 is therefore a later minor snapshot of the last major line, not the removal point.
-
config_file_error
F0000 is the configuration-file error condition, but its severity and recovery boundary depend on the owner. Fixed core paths include a recovery-target failure and OAuth HBA validation; the unaccent contrib dictionary has its own file-open and rule-…
-
lock_file_exists
F0001 is a startup ownership failure. PostgreSQL checks both the lock file and the shared-memory identity for the intended data directory; a live owner is different from a stale artifact left by a crashed postmaster.
-
fdw_error
HV000 is the generic SQL/MED foreign-data-wrapper error condition. It identifies the FDW error class, not a particular remote failure, callback, or retry policy. No direct ERRCODEFDWERROR report group was resolved in the PostgreSQL 18.6 core/contrib…
-
fdw_out_of_memory
HV001 is the SQL/MED condition for an FDW-side out-of-memory failure. In PostgreSQL 18.6, the bundled postgresfdw and dblink implementations use it when PQconndefaults() returns no option array, and postgresfdw also uses it when its option copy cann…
-
fdw_dynamic_parameter_value_needed
HV002 says that an FDW operation needs a parameter value that was not available. PostgreSQL 18.6's bundled file_fdw validator raises it during foreign-table option validation when neither filename nor program is supplied.
-
fdw_invalid_data_type
HV004 is the SQL/MED condition for a foreign-data-wrapper data type that cannot be used for the requested operation. The 18.6 core/contrib call scan found no resolved direct HV004 report group, so this page does not claim a particular bundled messag…
-
fdw_column_name_not_found
HV005 is the SQL/MED condition for a foreign column name that the wrapper cannot find in the relevant remote or imported descriptor. No direct HV005 report group was resolved in the PostgreSQL 18.6 core/contrib scan, so the concrete remote system an…
-
fdw_invalid_data_type_descriptors
HV006 covers invalid data-type descriptor information at an FDW boundary. PostgreSQL 18.6 defines it but the core/contrib call scan resolved no direct report group, so no bundled wrapper message or natural SQL reproduction is claimed.
-
fdw_invalid_column_name
HV007 is an FDW-specific invalid-column-name condition. The 18.6 core/contrib scan found no direct report group, so the wrapper that validates the name and its message must be identified from the actual deployment.
-
fdw_invalid_column_number
HV008 identifies an invalid column number (ordinal) in an FDW descriptor or callback. PostgreSQL 18.6 defines it, but its core/contrib call scan found no direct report group or bundled message.
-
fdw_invalid_use_of_null_pointer
HV009 describes an invalid null-pointer use at the FDW boundary. The PostgreSQL 18.6 core/contrib scan found no direct resolved report group, so no safe SQL reproduction or bundled message is claimed.
-
fdw_invalid_string_format
HV00A is the SQL/MED condition for an invalid string format at an FDW boundary. PostgreSQL 18.6's core/contrib call scan found no resolved direct report group, so the format grammar and message must come from the installed wrapper or remote driver.
-
fdw_invalid_handle
HV00B names an invalid FDW handle: a wrapper received a handle that is unknown, closed, or invalid for the current operation. The PostgreSQL 18.6 core/contrib call scan has no resolved direct HV00B report group, so the handle type and message are im…
-
fdw_invalid_option_index
HV00C identifies an option index that is invalid for the FDW option collection in use. No direct HV00C report group was resolved in the PostgreSQL 18.6 core/contrib scan, so no specific option array or message is attributed.
-
fdw_invalid_option_name
HV00D is raised when an FDW option name is not valid in the current wrapper context. PostgreSQL 18.6 has direct paths in filefdw, postgresfdw, and the postgres_fdw import option parser.
-
fdw_option_name_not_found
HV00J is used by dblink's connection-option validation when an option name is not in the accepted dblink/libpq option set. dblink is a separate contrib client API, not an FDW callback implementation. The 18.6 core/contrib scan found no other resolve…
-
fdw_reply_handle
HV00K is the SQL/MED reply-handle condition. PostgreSQL 18.6 defines it, but the locked core/contrib scan has no direct resolved HV00K report group; the condition does not by itself say whether a reply handle is missing, stale, or otherwise unusable.
-
fdw_unable_to_create_execution
HV00L denotes an FDW implementation's inability to create a remote execution object. No direct 18.6 core/contrib report group was resolved, so the object, remote API, and message are wrapper-specific.
-
fdw_unable_to_create_reply
HV00M denotes failure to create an FDW reply object or result channel. The PostgreSQL 18.6 core/contrib scan has no direct resolved report group; the exact object and driver boundary must be read from the installed wrapper.
-
fdw_unable_to_establish_connection
HV00N is the SQL/MED condition for an FDW unable to establish its connection. No direct 18.6 core/contrib HV00N report group was resolved. Do not use the condition name to choose between DNS, authentication, TLS, network, or remote-server causes.
-
fdw_no_schemas
HV00P is raised by the core IMPORT FOREIGN SCHEMA command when the selected FDW has no ImportForeignSchema callback. It means the wrapper does not support that import mechanism, not that a remote schema is empty.
-
fdw_schema_not_found
HV00Q is a concrete postgresfdw import error. Its remote connection runs an exact pgcatalog.pg_namespace lookup for the requested nspname; when the result count is not exactly one, the wrapper reports the remote schema by name.
-
fdw_table_not_found
HV00R identifies a table-not-found condition in the FDW class. The locked PostgreSQL 18.6 core/contrib call scan has no resolved HV00R report group, so it does not identify a core emitter, remote catalog, or message template.
-
fdw_function_sequence_error
HV010 indicates that an FDW function was called in an invalid sequence. The fixed 18.6 core/contrib call scan has no resolved HV010 report group, so it does not establish a native callback or message.
-
fdw_too_many_handles
HV014 identifies an FDW condition involving too many handles. No resolved HV014 report group was found in the locked PostgreSQL 18.6 core/contrib call scan, so no native handle limit or message is attributed.
-
fdw_inconsistent_descriptor_information
HV021 identifies inconsistent information in an FDW descriptor. The 18.6 core/contrib call scan has no resolved HV021 report group, so it does not identify a core descriptor check or message.
-
fdw_invalid_attribute_value
HV024 identifies an attribute value that an FDW boundary rejects. No resolved HV024 report group was found in the locked PostgreSQL 18.6 core/contrib call scan, so no particular attribute or message is confirmed.
-
fdw_invalid_string_length_or_buffer_length
HV090 identifies an invalid string length or buffer length at an FDW boundary. The locked 18.6 core/contrib call scan has no resolved HV090 report group, so it does not establish a native buffer check or message.
-
fdw_invalid_descriptor_field_identifier
HV091 identifies a descriptor field identifier that an FDW boundary cannot use. No resolved HV091 report group was found in the locked PostgreSQL 18.6 core/contrib call scan, so no particular descriptor namespace or message is confirmed.
-
plpgsql_error
P0000 is the PL/pgSQL Error category entry. The bounded PostgreSQL 18.6 call archive has no resolved report group for the category code itself, so member-code paths remain separate.
-
raise_exception
P0001 is the raise_exception condition in PostgreSQL's PL/pgSQL-specific Class P0. A RAISE EXCEPTION statement with no condition name and no explicit SQLSTATE defaults to this code. The message is supplied by the function author, so P0001 is usually…
-
no_data_found
P0002 is PL/pgSQL nodatafound. Fixed paths include the strict-query ERROR text and a separate tablespace NOTICE path; it does not mean every SELECT returning zero rows.
-
too_many_rows
P0003 is PL/pgSQL toomanyrows. Fixed paths preserve the message, optional parameter detail, hint, and the source-selected severity boundary.
-
assert_failure
P0004 is PL/pgSQL assert_failure. The fixed ASSERT path reports ERROR with either the evaluated message or assertion failed.
-
internal_error
XX000 is the internal_error condition in Class XX, Internal Error. The PostgreSQL source directory describes this class as covering “can't-happen” conditions and software bugs. It is a generic diagnostic boundary, not a claim that a database is corr…
-
data_corrupted
XX001 reports an integrity invariant failure. The fixed sources cover corrupted PGLZ TOAST data, impossible MultiXact/XID freeze state in heap processing, and an amcheck B-tree check that can reveal a heap/HOT-chain problem behind an apparent index …
-
index_corrupted
XX002 reports an index-structure failure. The fixed sources are method-specific: BRIN checks a range-map pointer, while GiST and hash check page headers, special areas, and method-specific metadata.