Eneboo - Documentación para desarrolladores
src/libpq/include/utils/errcodes.h
Ir a la documentación de este archivo.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * errcodes.h
00004  *        POSTGRES error codes
00005  *
00006  * The error code list is kept in its own source file for possible use by
00007  * automatic tools.  Each error code is identified by a five-character string
00008  * following the SQLSTATE conventions.  The exact representation of the
00009  * string is determined by the MAKE_SQLSTATE() macro, which is not defined
00010  * in this file; it can be defined by the caller for special purposes.
00011  *
00012  * Copyright (c) 2003-2005, PostgreSQL Global Development Group
00013  *
00014  * $PostgreSQL: pgsql/src/include/utils/errcodes.h,v 1.18 2005/06/26 19:16:06 tgl Exp $
00015  *
00016  *-------------------------------------------------------------------------
00017  */
00018 
00019 /* there is deliberately not an #ifndef ERRCODES_H here */
00020 
00021 
00022 /*
00023  * SQLSTATE codes for errors.
00024  *
00025  * The SQL99 code set is rather impoverished, especially in the area of
00026  * syntactical and semantic errors.  We have borrowed codes from IBM's DB2
00027  * and invented our own codes to develop a useful code set.
00028  *
00029  * When adding a new code, make sure it is placed in the most appropriate
00030  * class (the first two characters of the code value identify the class).
00031  * The listing is organized by class to make this prominent.
00032  *
00033  * The generic '000' subclass code should be used for an error only
00034  * when there is not a more-specific subclass code defined.
00035  *
00036  * The SQL spec requires that all the elements of a SQLSTATE code be
00037  * either digits or upper-case ASCII characters.
00038  *
00039  * Classes that begin with 0-4 or A-H are defined by the
00040  * standard. Within such a class, subclass values defined by the
00041  * standard must begin with 0-4 or A-H. To define a new error code,
00042  * ensure that it is either in an "implementation-defined class" (it
00043  * begins with 5-9 or I-Z), or its subclass falls outside the range of
00044  * error codes that could be present in future versions of the
00045  * standard (i.e. the subclass value begins with 5-9 or I-Z).
00046  *
00047  * The convention is that new error codes defined by PostgreSQL in a
00048  * class defined by the standard have a subclass value that begins
00049  * with 'P'. In addition, error codes defined by PostgreSQL clients
00050  * (such as ecpg) have a class value that begins with 'Y'.
00051  */
00052 
00053 /* Class 00 - Successful Completion */
00054 #define ERRCODE_SUCCESSFUL_COMPLETION           MAKE_SQLSTATE('0','0', '0','0','0')
00055 
00056 /* Class 01 - Warning */
00057 /* (do not use this class for failure conditions!) */
00058 #define ERRCODE_WARNING                                         MAKE_SQLSTATE('0','1', '0','0','0')
00059 #define ERRCODE_WARNING_DYNAMIC_RESULT_SETS_RETURNED            MAKE_SQLSTATE('0','1', '0','0','C')
00060 #define ERRCODE_WARNING_IMPLICIT_ZERO_BIT_PADDING       MAKE_SQLSTATE('0','1', '0','0','8')
00061 #define ERRCODE_WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION   MAKE_SQLSTATE('0','1', '0','0','3')
00062 #define ERRCODE_WARNING_PRIVILEGE_NOT_GRANTED           MAKE_SQLSTATE('0','1', '0','0','7')
00063 #define ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED           MAKE_SQLSTATE('0','1', '0','0','6')
00064 #define ERRCODE_WARNING_STRING_DATA_RIGHT_TRUNCATION    MAKE_SQLSTATE('0','1', '0','0','4')
00065 #define ERRCODE_WARNING_DEPRECATED_FEATURE      MAKE_SQLSTATE('0','1', 'P','0','1')
00066 
00067 /* Class 02 - No Data --- this is also a warning class per SQL99 */
00068 /* (do not use this class for failure conditions!) */
00069 #define ERRCODE_NO_DATA                                         MAKE_SQLSTATE('0','2', '0','0','0')
00070 #define ERRCODE_NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED      MAKE_SQLSTATE('0','2', '0','0','1')
00071 
00072 /* Class 03 - SQL Statement Not Yet Complete */
00073 #define ERRCODE_SQL_STATEMENT_NOT_YET_COMPLETE          MAKE_SQLSTATE('0','3', '0','0','0')
00074 
00075 /* Class 08 - Connection Exception */
00076 #define ERRCODE_CONNECTION_EXCEPTION            MAKE_SQLSTATE('0','8', '0','0','0')
00077 #define ERRCODE_CONNECTION_DOES_NOT_EXIST       MAKE_SQLSTATE('0','8', '0','0','3')
00078 #define ERRCODE_CONNECTION_FAILURE                      MAKE_SQLSTATE('0','8', '0','0','6')
00079 #define ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION             MAKE_SQLSTATE('0','8', '0','0','1')
00080 #define ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION       MAKE_SQLSTATE('0','8', '0','0','4')
00081 #define ERRCODE_TRANSACTION_RESOLUTION_UNKNOWN          MAKE_SQLSTATE('0','8', '0','0','7')
00082 #define ERRCODE_PROTOCOL_VIOLATION                      MAKE_SQLSTATE('0','8', 'P','0','1')
00083 
00084 /* Class 09 - Triggered Action Exception */
00085 #define ERRCODE_TRIGGERED_ACTION_EXCEPTION      MAKE_SQLSTATE('0','9', '0','0','0')
00086 
00087 /* Class 0A - Feature Not Supported */
00088 #define ERRCODE_FEATURE_NOT_SUPPORTED           MAKE_SQLSTATE('0','A', '0','0','0')
00089 
00090 /* Class 0B - Invalid Transaction Initiation */
00091 #define ERRCODE_INVALID_TRANSACTION_INITIATION          MAKE_SQLSTATE('0','B', '0','0','0')
00092 
00093 /* Class 0F - Locator Exception */
00094 #define ERRCODE_LOCATOR_EXCEPTION                       MAKE_SQLSTATE('0','F', '0','0','0')
00095 #define ERRCODE_L_E_INVALID_SPECIFICATION       MAKE_SQLSTATE('0','F', '0','0','1')
00096 
00097 /* Class 0L - Invalid Grantor */
00098 #define ERRCODE_INVALID_GRANTOR                         MAKE_SQLSTATE('0','L', '0','0','0')
00099 #define ERRCODE_INVALID_GRANT_OPERATION         MAKE_SQLSTATE('0','L', 'P','0','1')
00100 
00101 /* Class 0P - Invalid Role Specification */
00102 #define ERRCODE_INVALID_ROLE_SPECIFICATION      MAKE_SQLSTATE('0','P', '0','0','0')
00103 
00104 /* Class 21 - Cardinality Violation */
00105 /* (this means something returned the wrong number of rows) */
00106 #define ERRCODE_CARDINALITY_VIOLATION           MAKE_SQLSTATE('2','1', '0','0','0')
00107 
00108 /* Class 22 - Data Exception */
00109 #define ERRCODE_DATA_EXCEPTION                          MAKE_SQLSTATE('2','2', '0','0','0')
00110 #define ERRCODE_ARRAY_ELEMENT_ERROR                     MAKE_SQLSTATE('2','2', '0','2','E')
00111 /* SQL99's actual definition of "array element error" is subscript error */
00112 #define ERRCODE_ARRAY_SUBSCRIPT_ERROR           ERRCODE_ARRAY_ELEMENT_ERROR
00113 #define ERRCODE_CHARACTER_NOT_IN_REPERTOIRE MAKE_SQLSTATE('2','2', '0','2','1')
00114 #define ERRCODE_DATETIME_FIELD_OVERFLOW         MAKE_SQLSTATE('2','2', '0','0','8')
00115 #define ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ERRCODE_DATETIME_FIELD_OVERFLOW
00116 #define ERRCODE_DIVISION_BY_ZERO                        MAKE_SQLSTATE('2','2', '0','1','2')
00117 #define ERRCODE_ERROR_IN_ASSIGNMENT                     MAKE_SQLSTATE('2','2', '0','0','5')
00118 #define ERRCODE_ESCAPE_CHARACTER_CONFLICT       MAKE_SQLSTATE('2','2', '0','0','B')
00119 #define ERRCODE_INDICATOR_OVERFLOW                      MAKE_SQLSTATE('2','2', '0','2','2')
00120 #define ERRCODE_INTERVAL_FIELD_OVERFLOW         MAKE_SQLSTATE('2','2', '0','1','5')
00121 #define ERRCODE_INVALID_ARGUMENT_FOR_LOG        MAKE_SQLSTATE('2','2', '0','1','E')
00122 #define ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION MAKE_SQLSTATE('2','2', '0', '1', 'F')
00123 #define ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION      MAKE_SQLSTATE('2','2', '0', '1', 'G')
00124 #define ERRCODE_INVALID_CHARACTER_VALUE_FOR_CAST                MAKE_SQLSTATE('2','2', '0','1','8')
00125 #define ERRCODE_INVALID_DATETIME_FORMAT         MAKE_SQLSTATE('2','2', '0','0','7')
00126 #define ERRCODE_INVALID_ESCAPE_CHARACTER        MAKE_SQLSTATE('2','2', '0','1','9')
00127 #define ERRCODE_INVALID_ESCAPE_OCTET            MAKE_SQLSTATE('2','2', '0','0','D')
00128 #define ERRCODE_INVALID_ESCAPE_SEQUENCE         MAKE_SQLSTATE('2','2', '0','2','5')
00129 #define ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER             MAKE_SQLSTATE('2','2', 'P','0','6')
00130 #define ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE               MAKE_SQLSTATE('2','2', '0','1','0')
00131 #define ERRCODE_INVALID_LIMIT_VALUE                     MAKE_SQLSTATE('2','2', '0','2','0')
00132 #define ERRCODE_INVALID_PARAMETER_VALUE         MAKE_SQLSTATE('2','2', '0','2','3')
00133 #define ERRCODE_INVALID_REGULAR_EXPRESSION      MAKE_SQLSTATE('2','2', '0','1','B')
00134 #define ERRCODE_INVALID_TIME_ZONE_DISPLACEMENT_VALUE    MAKE_SQLSTATE('2','2', '0','0','9')
00135 #define ERRCODE_INVALID_USE_OF_ESCAPE_CHARACTER         MAKE_SQLSTATE('2','2', '0','0','C')
00136 #define ERRCODE_MOST_SPECIFIC_TYPE_MISMATCH MAKE_SQLSTATE('2','2', '0','0','G')
00137 #define ERRCODE_NULL_VALUE_NOT_ALLOWED          MAKE_SQLSTATE('2','2', '0','0','4')
00138 #define ERRCODE_NULL_VALUE_NO_INDICATOR_PARAMETER       MAKE_SQLSTATE('2','2', '0','0','2')
00139 #define ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE      MAKE_SQLSTATE('2','2', '0','0','3')
00140 #define ERRCODE_STRING_DATA_LENGTH_MISMATCH MAKE_SQLSTATE('2','2', '0','2','6')
00141 #define ERRCODE_STRING_DATA_RIGHT_TRUNCATION            MAKE_SQLSTATE('2','2', '0','0','1')
00142 #define ERRCODE_SUBSTRING_ERROR                         MAKE_SQLSTATE('2','2', '0','1','1')
00143 #define ERRCODE_TRIM_ERROR                                      MAKE_SQLSTATE('2','2', '0','2','7')
00144 #define ERRCODE_UNTERMINATED_C_STRING           MAKE_SQLSTATE('2','2', '0','2','4')
00145 #define ERRCODE_ZERO_LENGTH_CHARACTER_STRING            MAKE_SQLSTATE('2','2', '0','0','F')
00146 #define ERRCODE_FLOATING_POINT_EXCEPTION        MAKE_SQLSTATE('2','2', 'P','0','1')
00147 #define ERRCODE_INVALID_TEXT_REPRESENTATION MAKE_SQLSTATE('2','2', 'P','0','2')
00148 #define ERRCODE_INVALID_BINARY_REPRESENTATION   MAKE_SQLSTATE('2','2', 'P','0','3')
00149 #define ERRCODE_BAD_COPY_FILE_FORMAT            MAKE_SQLSTATE('2','2', 'P','0','4')
00150 #define ERRCODE_UNTRANSLATABLE_CHARACTER        MAKE_SQLSTATE('2','2', 'P','0','5')
00151 
00152 /* Class 23 - Integrity Constraint Violation */
00153 #define ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION          MAKE_SQLSTATE('2','3', '0','0','0')
00154 #define ERRCODE_RESTRICT_VIOLATION                      MAKE_SQLSTATE('2','3', '0','0','1')
00155 #define ERRCODE_NOT_NULL_VIOLATION                      MAKE_SQLSTATE('2','3', '5','0','2')
00156 #define ERRCODE_FOREIGN_KEY_VIOLATION           MAKE_SQLSTATE('2','3', '5','0','3')
00157 #define ERRCODE_UNIQUE_VIOLATION                        MAKE_SQLSTATE('2','3', '5','0','5')
00158 #define ERRCODE_CHECK_VIOLATION                         MAKE_SQLSTATE('2','3', '5','1','4')
00159 
00160 /* Class 24 - Invalid Cursor State */
00161 #define ERRCODE_INVALID_CURSOR_STATE            MAKE_SQLSTATE('2','4', '0','0','0')
00162 
00163 /* Class 25 - Invalid Transaction State */
00164 #define ERRCODE_INVALID_TRANSACTION_STATE       MAKE_SQLSTATE('2','5', '0','0','0')
00165 #define ERRCODE_ACTIVE_SQL_TRANSACTION          MAKE_SQLSTATE('2','5', '0','0','1')
00166 #define ERRCODE_BRANCH_TRANSACTION_ALREADY_ACTIVE       MAKE_SQLSTATE('2','5', '0','0','2')
00167 #define ERRCODE_HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL       MAKE_SQLSTATE('2','5', '0','0','8')
00168 #define ERRCODE_INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION        MAKE_SQLSTATE('2','5', '0','0','3')
00169 #define ERRCODE_INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION    MAKE_SQLSTATE('2','5', '0','0','4')
00170 #define ERRCODE_NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION        MAKE_SQLSTATE('2','5', '0','0','5')
00171 #define ERRCODE_READ_ONLY_SQL_TRANSACTION       MAKE_SQLSTATE('2','5', '0','0','6')
00172 #define ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED  MAKE_SQLSTATE('2','5', '0','0','7')
00173 #define ERRCODE_NO_ACTIVE_SQL_TRANSACTION       MAKE_SQLSTATE('2','5', 'P','0','1')
00174 #define ERRCODE_IN_FAILED_SQL_TRANSACTION       MAKE_SQLSTATE('2','5', 'P','0','2')
00175 
00176 /* Class 26 - Invalid SQL Statement Name */
00177 /* (we take this to mean prepared statements) */
00178 #define ERRCODE_INVALID_SQL_STATEMENT_NAME      MAKE_SQLSTATE('2','6', '0','0','0')
00179 
00180 /* Class 27 - Triggered Data Change Violation */
00181 #define ERRCODE_TRIGGERED_DATA_CHANGE_VIOLATION         MAKE_SQLSTATE('2','7', '0','0','0')
00182 
00183 /* Class 28 - Invalid Authorization Specification */
00184 #define ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION MAKE_SQLSTATE('2','8', '0','0','0')
00185 
00186 /* Class 2B - Dependent Privilege Descriptors Still Exist */
00187 #define ERRCODE_DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST             MAKE_SQLSTATE('2','B', '0','0','0')
00188 #define ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST           MAKE_SQLSTATE('2','B', 'P','0','1')
00189 
00190 /* Class 2D - Invalid Transaction Termination */
00191 #define ERRCODE_INVALID_TRANSACTION_TERMINATION         MAKE_SQLSTATE('2','D', '0','0','0')
00192 
00193 /* Class 2F - SQL Routine Exception */
00194 #define ERRCODE_SQL_ROUTINE_EXCEPTION           MAKE_SQLSTATE('2','F', '0','0','0')
00195 #define ERRCODE_S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT MAKE_SQLSTATE('2','F', '0','0','5')
00196 #define ERRCODE_S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED          MAKE_SQLSTATE('2','F', '0','0','2')
00197 #define ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED        MAKE_SQLSTATE('2','F', '0','0','3')
00198 #define ERRCODE_S_R_E_READING_SQL_DATA_NOT_PERMITTED            MAKE_SQLSTATE('2','F', '0','0','4')
00199 
00200 /* Class 34 - Invalid Cursor Name */
00201 #define ERRCODE_INVALID_CURSOR_NAME                     MAKE_SQLSTATE('3','4', '0','0','0')
00202 
00203 /* Class 38 - External Routine Exception */
00204 #define ERRCODE_EXTERNAL_ROUTINE_EXCEPTION      MAKE_SQLSTATE('3','8', '0','0','0')
00205 #define ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED      MAKE_SQLSTATE('3','8', '0','0','1')
00206 #define ERRCODE_E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED  MAKE_SQLSTATE('3','8', '0','0','2')
00207 #define ERRCODE_E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED        MAKE_SQLSTATE('3','8', '0','0','3')
00208 #define ERRCODE_E_R_E_READING_SQL_DATA_NOT_PERMITTED    MAKE_SQLSTATE('3','8', '0','0','4')
00209 
00210 /* Class 39 - External Routine Invocation Exception */
00211 #define ERRCODE_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION   MAKE_SQLSTATE('3','9', '0','0','0')
00212 #define ERRCODE_E_R_I_E_INVALID_SQLSTATE_RETURNED       MAKE_SQLSTATE('3','9', '0','0','1')
00213 #define ERRCODE_E_R_I_E_NULL_VALUE_NOT_ALLOWED  MAKE_SQLSTATE('3','9', '0','0','4')
00214 #define ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED       MAKE_SQLSTATE('3','9', 'P','0','1')
00215 #define ERRCODE_E_R_I_E_SRF_PROTOCOL_VIOLATED   MAKE_SQLSTATE('3','9', 'P','0','2')
00216 
00217 /* Class 3B - Savepoint Exception */
00218 #define ERRCODE_SAVEPOINT_EXCEPTION                     MAKE_SQLSTATE('3','B', '0','0','0')
00219 #define ERRCODE_S_E_INVALID_SPECIFICATION       MAKE_SQLSTATE('3','B', '0','0','1')
00220 
00221 /* Class 3D - Invalid Catalog Name */
00222 #define ERRCODE_INVALID_CATALOG_NAME            MAKE_SQLSTATE('3','D', '0','0','0')
00223 
00224 /* Class 3F - Invalid Schema Name */
00225 #define ERRCODE_INVALID_SCHEMA_NAME                     MAKE_SQLSTATE('3','F', '0','0','0')
00226 
00227 /* Class 40 - Transaction Rollback */
00228 #define ERRCODE_TRANSACTION_ROLLBACK            MAKE_SQLSTATE('4','0', '0','0','0')
00229 #define ERRCODE_T_R_INTEGRITY_CONSTRAINT_VIOLATION      MAKE_SQLSTATE('4','0', '0','0','2')
00230 #define ERRCODE_T_R_SERIALIZATION_FAILURE       MAKE_SQLSTATE('4','0', '0','0','1')
00231 #define ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN        MAKE_SQLSTATE('4','0', '0','0','3')
00232 #define ERRCODE_T_R_DEADLOCK_DETECTED           MAKE_SQLSTATE('4','0', 'P','0','1')
00233 
00234 /* Class 42 - Syntax Error or Access Rule Violation */
00235 #define ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION           MAKE_SQLSTATE('4','2', '0','0','0')
00236 /* never use the above; use one of these two if no specific code exists: */
00237 #define ERRCODE_SYNTAX_ERROR                            MAKE_SQLSTATE('4','2', '6','0','1')
00238 #define ERRCODE_INSUFFICIENT_PRIVILEGE          MAKE_SQLSTATE('4','2', '5','0','1')
00239 #define ERRCODE_CANNOT_COERCE                           MAKE_SQLSTATE('4','2', '8','4','6')
00240 #define ERRCODE_GROUPING_ERROR                          MAKE_SQLSTATE('4','2', '8','0','3')
00241 #define ERRCODE_INVALID_FOREIGN_KEY                     MAKE_SQLSTATE('4','2', '8','3','0')
00242 #define ERRCODE_INVALID_NAME                            MAKE_SQLSTATE('4','2', '6','0','2')
00243 #define ERRCODE_NAME_TOO_LONG                           MAKE_SQLSTATE('4','2', '6','2','2')
00244 #define ERRCODE_RESERVED_NAME                           MAKE_SQLSTATE('4','2', '9','3','9')
00245 #define ERRCODE_DATATYPE_MISMATCH                       MAKE_SQLSTATE('4','2', '8','0','4')
00246 #define ERRCODE_INDETERMINATE_DATATYPE          MAKE_SQLSTATE('4','2', 'P','1','8')
00247 #define ERRCODE_WRONG_OBJECT_TYPE                       MAKE_SQLSTATE('4','2', '8','0','9')
00248 /*
00249  * Note: for ERRCODE purposes, we divide namable objects into these categories:
00250  * databases, schemas, prepared statements, cursors, tables, columns,
00251  * functions (including operators), and all else (lumped as "objects").
00252  * (The first four categories are mandated by the existence of separate
00253  * SQLSTATE classes for them in the spec; in this file, however, we group
00254  * the ERRCODE names with all the rest under class 42.)  Parameters are
00255  * sort-of-named objects and get their own ERRCODE.
00256  *
00257  * The same breakdown is used for "duplicate" and "ambiguous" complaints,
00258  * as well as complaints associated with incorrect declarations.
00259  */
00260 #define ERRCODE_UNDEFINED_COLUMN                        MAKE_SQLSTATE('4','2', '7','0','3')
00261 #define ERRCODE_UNDEFINED_CURSOR                        ERRCODE_INVALID_CURSOR_NAME
00262 #define ERRCODE_UNDEFINED_DATABASE                      ERRCODE_INVALID_CATALOG_NAME
00263 #define ERRCODE_UNDEFINED_FUNCTION                      MAKE_SQLSTATE('4','2', '8','8','3')
00264 #define ERRCODE_UNDEFINED_PSTATEMENT            ERRCODE_INVALID_SQL_STATEMENT_NAME
00265 #define ERRCODE_UNDEFINED_SCHEMA                        ERRCODE_INVALID_SCHEMA_NAME
00266 #define ERRCODE_UNDEFINED_TABLE                         MAKE_SQLSTATE('4','2', 'P','0','1')
00267 #define ERRCODE_UNDEFINED_PARAMETER                     MAKE_SQLSTATE('4','2', 'P','0','2')
00268 #define ERRCODE_UNDEFINED_OBJECT                        MAKE_SQLSTATE('4','2', '7','0','4')
00269 #define ERRCODE_DUPLICATE_COLUMN                        MAKE_SQLSTATE('4','2', '7','0','1')
00270 #define ERRCODE_DUPLICATE_CURSOR                        MAKE_SQLSTATE('4','2', 'P','0','3')
00271 #define ERRCODE_DUPLICATE_DATABASE                      MAKE_SQLSTATE('4','2', 'P','0','4')
00272 #define ERRCODE_DUPLICATE_FUNCTION                      MAKE_SQLSTATE('4','2', '7','2','3')
00273 #define ERRCODE_DUPLICATE_PSTATEMENT            MAKE_SQLSTATE('4','2', 'P','0','5')
00274 #define ERRCODE_DUPLICATE_SCHEMA                        MAKE_SQLSTATE('4','2', 'P','0','6')
00275 #define ERRCODE_DUPLICATE_TABLE                         MAKE_SQLSTATE('4','2', 'P','0','7')
00276 #define ERRCODE_DUPLICATE_ALIAS                         MAKE_SQLSTATE('4','2', '7','1','2')
00277 #define ERRCODE_DUPLICATE_OBJECT                        MAKE_SQLSTATE('4','2', '7','1','0')
00278 #define ERRCODE_AMBIGUOUS_COLUMN                        MAKE_SQLSTATE('4','2', '7','0','2')
00279 #define ERRCODE_AMBIGUOUS_FUNCTION                      MAKE_SQLSTATE('4','2', '7','2','5')
00280 #define ERRCODE_AMBIGUOUS_PARAMETER                     MAKE_SQLSTATE('4','2', 'P','0','8')
00281 #define ERRCODE_AMBIGUOUS_ALIAS                         MAKE_SQLSTATE('4','2', 'P','0','9')
00282 #define ERRCODE_INVALID_COLUMN_REFERENCE        MAKE_SQLSTATE('4','2', 'P','1','0')
00283 #define ERRCODE_INVALID_COLUMN_DEFINITION       MAKE_SQLSTATE('4','2', '6','1','1')
00284 #define ERRCODE_INVALID_CURSOR_DEFINITION       MAKE_SQLSTATE('4','2', 'P','1','1')
00285 #define ERRCODE_INVALID_DATABASE_DEFINITION MAKE_SQLSTATE('4','2', 'P','1','2')
00286 #define ERRCODE_INVALID_FUNCTION_DEFINITION MAKE_SQLSTATE('4','2', 'P','1','3')
00287 #define ERRCODE_INVALID_PSTATEMENT_DEFINITION   MAKE_SQLSTATE('4','2', 'P','1','4')
00288 #define ERRCODE_INVALID_SCHEMA_DEFINITION       MAKE_SQLSTATE('4','2', 'P','1','5')
00289 #define ERRCODE_INVALID_TABLE_DEFINITION        MAKE_SQLSTATE('4','2', 'P','1','6')
00290 #define ERRCODE_INVALID_OBJECT_DEFINITION       MAKE_SQLSTATE('4','2', 'P','1','7')
00291 
00292 /* Class 44 - WITH CHECK OPTION Violation */
00293 #define ERRCODE_WITH_CHECK_OPTION_VIOLATION MAKE_SQLSTATE('4','4', '0','0','0')
00294 
00295 /* Class 53 - Insufficient Resources (PostgreSQL-specific error class) */
00296 #define ERRCODE_INSUFFICIENT_RESOURCES          MAKE_SQLSTATE('5','3', '0','0','0')
00297 #define ERRCODE_DISK_FULL                                       MAKE_SQLSTATE('5','3', '1','0','0')
00298 #define ERRCODE_OUT_OF_MEMORY                           MAKE_SQLSTATE('5','3', '2','0','0')
00299 #define ERRCODE_TOO_MANY_CONNECTIONS            MAKE_SQLSTATE('5','3', '3','0','0')
00300 
00301 /* Class 54 - Program Limit Exceeded (class borrowed from DB2) */
00302 /* (this is for wired-in limits, not resource exhaustion problems) */
00303 #define ERRCODE_PROGRAM_LIMIT_EXCEEDED          MAKE_SQLSTATE('5','4', '0','0','0')
00304 #define ERRCODE_STATEMENT_TOO_COMPLEX           MAKE_SQLSTATE('5','4', '0','0','1')
00305 #define ERRCODE_TOO_MANY_COLUMNS                        MAKE_SQLSTATE('5','4', '0','1','1')
00306 #define ERRCODE_TOO_MANY_ARGUMENTS                      MAKE_SQLSTATE('5','4', '0','2','3')
00307 
00308 /* Class 55 - Object Not In Prerequisite State (class borrowed from DB2) */
00309 #define ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE        MAKE_SQLSTATE('5','5', '0','0','0')
00310 #define ERRCODE_OBJECT_IN_USE                           MAKE_SQLSTATE('5','5', '0','0','6')
00311 #define ERRCODE_CANT_CHANGE_RUNTIME_PARAM       MAKE_SQLSTATE('5','5', 'P','0','2')
00312 #define ERRCODE_LOCK_NOT_AVAILABLE                      MAKE_SQLSTATE('5','5', 'P','0','3')
00313 
00314 /* Class 57 - Operator Intervention (class borrowed from DB2) */
00315 #define ERRCODE_OPERATOR_INTERVENTION           MAKE_SQLSTATE('5','7', '0','0','0')
00316 #define ERRCODE_QUERY_CANCELED                          MAKE_SQLSTATE('5','7', '0','1','4')
00317 #define ERRCODE_ADMIN_SHUTDOWN                          MAKE_SQLSTATE('5','7', 'P','0','1')
00318 #define ERRCODE_CRASH_SHUTDOWN                          MAKE_SQLSTATE('5','7', 'P','0','2')
00319 #define ERRCODE_CANNOT_CONNECT_NOW                      MAKE_SQLSTATE('5','7', 'P','0','3')
00320 
00321 /* Class 58 - System Error (class borrowed from DB2) */
00322 /* (we define this as errors external to PostgreSQL itself) */
00323 #define ERRCODE_IO_ERROR                                        MAKE_SQLSTATE('5','8', '0','3','0')
00324 #define ERRCODE_UNDEFINED_FILE                          MAKE_SQLSTATE('5','8', 'P','0','1')
00325 #define ERRCODE_DUPLICATE_FILE                          MAKE_SQLSTATE('5','8', 'P','0','2')
00326 
00327 /* Class F0 - Configuration File Error (PostgreSQL-specific error class) */
00328 #define ERRCODE_CONFIG_FILE_ERROR                       MAKE_SQLSTATE('F','0', '0','0','0')
00329 #define ERRCODE_LOCK_FILE_EXISTS                        MAKE_SQLSTATE('F','0', '0','0','1')
00330 
00331 /* Class P0 - PL/pgSQL Error (PostgreSQL-specific error class) */
00332 #define ERRCODE_PLPGSQL_ERROR                           MAKE_SQLSTATE('P','0', '0','0','0')
00333 #define ERRCODE_RAISE_EXCEPTION                         MAKE_SQLSTATE('P','0', '0','0','1')
00334 
00335 /* Class XX - Internal Error (PostgreSQL-specific error class) */
00336 /* (this is for "can't-happen" conditions and software bugs) */
00337 #define ERRCODE_INTERNAL_ERROR                          MAKE_SQLSTATE('X','X', '0','0','0')
00338 #define ERRCODE_DATA_CORRUPTED                          MAKE_SQLSTATE('X','X', '0','0','1')
00339 #define ERRCODE_INDEX_CORRUPTED                         MAKE_SQLSTATE('X','X', '0','0','2')
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'