]> granicus.if.org Git - postgresql/commitdiff
Add foreign data wrapper error code values for SQL/MED.
authorRobert Haas <rhaas@postgresql.org>
Sat, 25 Dec 2010 18:55:58 +0000 (13:55 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sat, 25 Dec 2010 18:57:39 +0000 (13:57 -0500)
Extracted from a much larger patch by Shigeru Hanada.

src/include/utils/errcodes.h

index 5cab47a092bd73cbf1cc74315f85ae581db95b1b..3b332b6e4e175b4dfbe6a7cef093d175b63be495 100644 (file)
 #define ERRCODE_CONFIG_FILE_ERROR                      MAKE_SQLSTATE('F','0', '0','0','0')
 #define ERRCODE_LOCK_FILE_EXISTS                       MAKE_SQLSTATE('F','0', '0','0','1')
 
+/* Class HV - Foreign Data Wrapper Error (SQL/MED-specific error class) */
+#define ERRCODE_FDW_ERROR                                      MAKE_SQLSTATE('H','V', '0','0','0')
+#define ERRCODE_FDW_COLUMN_NAME_NOT_FOUND      MAKE_SQLSTATE('H','V', '0','0','5')
+#define ERRCODE_FDW_DYNAMIC_PARAMETER_VALUE_NEEDED     MAKE_SQLSTATE('H','V', '0','0','2')
+#define ERRCODE_FDW_FUNCTION_SEQUENCE_ERROR    MAKE_SQLSTATE('H','V', '0','1','0')
+#define ERRCODE_FDW_INCONSISTENT_DESCRIPTOR_INFORMATION        MAKE_SQLSTATE('H','V', '0','2','1')
+#define ERRCODE_FDW_INVALID_ATTRIBUTE_VALUE    MAKE_SQLSTATE('H','V', '0','2','4')
+#define ERRCODE_FDW_INVALID_COLUMN_NAME        MAKE_SQLSTATE('H','V', '0','0','7')
+#define ERRCODE_FDW_INVALID_COLUMN_NUMBER      MAKE_SQLSTATE('H','V', '0','0','8')
+#define ERRCODE_FDW_INVALID_DATA_TYPE          MAKE_SQLSTATE('H','V', '0','0','4')
+#define ERRCODE_FDW_INVALID_DATA_TYPE_DESCRIPTORS      MAKE_SQLSTATE('H','V', '0','0','6')
+#define ERRCODE_FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER        MAKE_SQLSTATE('H','V', '0','9','1')
+#define ERRCODE_FDW_INVALID_HANDLE                     MAKE_SQLSTATE('H','V', '0','0','B')
+#define ERRCODE_FDW_INVALID_OPTION_INDEX       MAKE_SQLSTATE('H','V', '0','0','C')
+#define ERRCODE_FDW_INVALID_OPTION_NAME                MAKE_SQLSTATE('H','V', '0','0','D')
+#define ERRCODE_FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH     MAKE_SQLSTATE('H','V', '0','9','0')
+#define ERRCODE_FDW_INVALID_STRING_FORMAT      MAKE_SQLSTATE('H','V', '0','0','A')
+#define ERRCODE_FDW_INVALID_USE_OF_NULL_POINTER        MAKE_SQLSTATE('H','V', '0','0','9')
+#define ERRCODE_FDW_TOO_MANY_HANDLES           MAKE_SQLSTATE('H','V', '0','1','4')
+#define ERRCODE_FDW_OUT_OF_MEMORY                      MAKE_SQLSTATE('H','V', '0','0','1')
+#define ERRCODE_FDW_NO_SCHEMAS                         MAKE_SQLSTATE('H','V', '0','0','P')
+#define ERRCODE_FDW_OPTION_NAME_NOT_FOUND      MAKE_SQLSTATE('H','V', '0','0','J')
+#define ERRCODE_FDW_REPLY_HANDLE                       MAKE_SQLSTATE('H','V', '0','0','K')
+#define ERRCODE_FDW_SCHEMA_NOT_FOUND           MAKE_SQLSTATE('H','V', '0','0','Q')
+#define ERRCODE_FDW_TABLE_NOT_FOUND                    MAKE_SQLSTATE('H','V', '0','0','R')
+#define ERRCODE_FDW_UNALBE_TO_CREATE_EXECUTION MAKE_SQLSTATE('H','V', '0','0','L')
+#define ERRCODE_FDW_UNABLE_TO_CREATE_REPLY     MAKE_SQLSTATE('H','V', '0','0','M')
+#define ERRCODE_FDW_UNABLE_TO_ESTABLISH_CONNECTION     MAKE_SQLSTATE('H','V', '0','0','N')
+
 /* Class P0 - PL/pgSQL Error (PostgreSQL-specific error class) */
 #define ERRCODE_PLPGSQL_ERROR                          MAKE_SQLSTATE('P','0', '0','0','0')
 #define ERRCODE_RAISE_EXCEPTION                                MAKE_SQLSTATE('P','0', '0','0','1')