PostgreSQL Error Codes

KWDB uses several PostgreSQL error codes (PGcodes), along with some KWDB-specific error codes that are compatible with PGcode.

This section provides a list of PGcodes used in KWDB, along with recommended actions.

Note

Some PGcodes may correspond to multiple messages. While these messages may vary slightly, the underlying cause of the error remains consistent. The table below includes only the messages associated with the original PGcode error and does not cover KWDB’s custom messages. Use the error code to identify the cause and take the appropriate action.

Error CodeMessageSuggested Action
08P01ProtocolViolationContact support
0A000FeatureNotSupportedNo action available
0LP01InvalidGrantOperationRetry after modifying the SQL statement
1000WarningNo action available
21000CardinalityViolationContact support
22000DeleteFailureRestart the service and check table data, or review logs
22001StringDataRightTruncationRetry after modifying the SQL statement
22003NumericValueOutOfRangeRetry after modifying the SQL statement
22004NullValueNotAllowedRetry after modifying the SQL statement
22005InvalidEscapeSequenceRetry after modifying the SQL statement
22007InvalidDatetimeFormatRetry after modifying the SQL statement
22008DatetimeFieldOverflowContact support
22012DivisionByZeroRetry after modifying the SQL statement
22013InvalidWindowFrameOffsetRetry after modifying the SQL statement
2201EInvalidArgumentForLogarithmRetry after modifying the SQL statement
22021CharacterNotInRepertoireCheck if the input characters comply with UTF8 standards
22023InvalidParameterValueRetry after modifying the SQL statement
22026StringDataLengthMismatchRetry after modifying the SQL statement
2202EArraySubscriptRetry after modifying the array subscript
22C01ScalarOperationCannotRunWithoutFullSessionContextRetry after modifying the SQL statement
22P02InvalidTextRepresentationRetry after modifying the SQL statement
22P03InvalidBinaryRepresentationRetry after modifying the SQL statement
22P05UntranslatableCharacterRetry after modifying the SQL statement
23502NotNullViolationRetry after modifying the SQL statement
23503ForeignKeyViolationRetry after modifying the SQL statement
23505UniqueViolationRetry after modifying the SQL statement
23514CheckViolationRetry after modifying the SQL statement
25000InvalidTransactionStateRetry after committing or rolling back the current transaction
25001ActiveSQLTransactionDo not use the DISCARD command in the middle of a transaction
25006ReadOnlySQLTransactionRetry after starting a read-write transaction
25P02InFailedSQLTransactionEnd the current transaction and retry with a new one
25P03NullTransactionRetry after modifying the SQL statement
26000InvalidSQLStatementNameRetry after modifying the SQL statement
28P01InvalidPasswordRetry after modifying the SQL statement
2BP01DependentObjectsStillExistResolve dependency issues before retrying
34000InvalidCursorNameRetry after modifying the SQL statement
3B001InvalidSavepointSpecificationRetry after modifying the SQL statement
3D000InvalidCatalogNameRetry after modifying the SQL statement
3D000UndefinedDatabaseRetry after modifying the SQL statement
3F000InvalidSchemaNameRetry after modifying the SQL statement
42501InsufficientPrivilegeRetry after requesting privileges from the administrator
42601SyntaxRetry after modifying the SQL statement
42602InvalidNameRetry after modifying the SQL statement
42611InvalidColumnDefinitionRetry after modifying the SQL statement
42622NameTooLongRetry after modifying the SQL statement
42701DuplicateColumnRetry after modifying the SQL statement
42702AmbiguousColumnRetry after modifying the SQL statement
42703UndefinedColumnRetry after modifying the SQL statement
42704UndefinedObjectRetry after modifying the SQL statement
42710DuplicateObjectRetry after modifying the SQL statement
42711DuplicateParameterRetry after modifying the SQL statement
42723DuplicateFunctionRetry after modifying the SQL statement
42725AmbiguousFunctionRetry after modifying the SQL statement
42803GroupingRetry after modifying the SQL statement
42804DatatypeMismatchRetry after modifying the SQL statement
42809WrongObjectTypeRetry after modifying the SQL statement
42830InvalidForeignKeyRetry after modifying the SQL statement
42846CannotCoerceRetry after modifying the SQL statement
42883UndefinedFunctionRetry after modifying the SQL statement
42939ReservedNameRetry after modifying the SQL statement
42C02SyncObjectFailedContact support
42C03WrongExprRetry after modifying the SQL statement
42C04NumberMismatchRetry after modifying the SQL statement
42P01UndefinedTableRetry after modifying the SQL statement
42P02UndefinedParameterRetry after modifying the SQL statement
42P04DuplicateDatabaseRetry after modifying the SQL statement
42P06DuplicateSchemaRetry after modifying the SQL statement
42P07DuplicateRelationRetry after modifying the SQL statement
42P08AmbiguousParameterRetry after modifying the SQL statement
42P09AmbiguousAliasUse a clear alias in the query
42P10InvalidColumnReferenceRetry after modifying the SQL statement
42P15InvalidSchemaDefinitionRetry after modifying the SQL statement
42P16InvalidTableDefinitionRetry after modifying the SQL statement
42P17InvalidObjectDefinitionRetry after modifying the SQL statement
42P18IndeterminateDatatypeRetry after modifying the SQL statement
42P20WindowingRetry after modifying the SQL statement
53200OutOfMemoryContact support
54000ProgramLimitExceededRetry after modifying the SQL statement
54011TooManyColumnsRetry after modifying the SQL statement
54021TooWideRowWidthRetry after modifying the SQL statement
54022InsertColumnMismatchRetry after modifying the SQL statement
54024TooWideTagWidthRetry after modifying the SQL statement
55000ObjectNotInPrerequisiteStateResolve dependency issues before retrying
55006ObjectInUseRetry after terminating the operation that is occupying the object
55P02CantChangeRuntimeParamRetry after taking the database offline
57P03CannotConnectNowRetry after the database is available for connection
58C00RangeUnavailableContact support
58C01InternalConnectionFailureContact support
59000replication_errorCheck primary-secondary replication status
59001replication_primary_errorCheck primary node status and logs
59002replication_secondary_errorCheck secondary node status and logs
XX000InternalContact support
XXC01CCLRequiredContact support