⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errcodes.sgml

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 SGML
📖 第 1 页 / 共 2 页
字号:
<!-- $PostgreSQL: pgsql/doc/src/sgml/errcodes.sgml,v 1.15.2.3 2005/12/09 18:07:57 tgl Exp $ --><appendix id="errcodes-appendix"> <title><productname>PostgreSQL</productname> Error Codes</title> <indexterm zone="errcodes-appendix">  <primary>error codes</primary>  <secondary>list of</secondary> </indexterm> <para>  All messages emitted by the <productname>PostgreSQL</productname>  server are assigned five-character error codes that follow the SQL  standard's conventions for <quote>SQLSTATE</> codes.  Applications  that need to know which error condition has occurred should usually  test the error code, rather than looking at the textual error  message.  The error codes are less likely to change across  <productname>PostgreSQL</> releases, and also are not subject to  change due to localization of error messages. Note that some, but  not all, of the error codes produced by <productname>PostgreSQL</>  are defined by the SQL standard; some additional error codes for  conditions not defined by the standard have been invented or  borrowed from other databases. </para> <para>  According to the standard, the first two characters of an error code  denote a class of errors, while the last three characters indicate  a specific condition within that class.  Thus, an application that  does not recognize the specific error code may still be able to infer  what to do from the error class. </para> <para>  <xref linkend="errcodes-table"> lists all the error codes defined in  <productname>PostgreSQL</productname> &version;.  (Some are not actually  used at present, but are defined by the SQL standard.)  The error classes are also shown.  For each error class there is a  <quote>standard</> error code having the last three characters  <literal>000</>.  This code is used only for error conditions that fall  within the class but do not have any more-specific code assigned. </para> <para>  The <application>PL/pgSQL</> condition name for each error code is the  same as the phrase shown in the table, with underscores substituted  for spaces.  For example, code <literal>22012</>, DIVISION BY ZERO,  has condition name <literal>DIVISION_BY_ZERO</>.  Condition names can  be written in either upper or lower case.  (Note that  <application>PL/pgSQL</> does not recognize warning, as opposed to error,  condition names; those are classes 00, 01, and 02.) </para><!-- The following table should correspond to the contents of src/include/utils/errcodes.h and src/pl/plpgsql/src/plerrcodes.h.--><table id="errcodes-table"> <title><productname>PostgreSQL</productname> Error Codes</title> <tgroup cols="3">  <colspec colnum="1" colname="errorcode">  <colspec colnum="3" colname="constant">  <spanspec namest="errorcode" nameend="constant" spanname="span13">  <thead>   <row>    <entry>Error Code</entry>    <entry>Meaning</entry>    <entry>Constant</entry>   </row>  </thead>  <tbody><row><entry spanname="span13"><emphasis role="bold">Class 00 &mdash; Successful Completion</></entry></row><row><entry>0</entry><entry>SUCCESSFUL COMPLETION</entry><entry>successful_completion</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 01&mdash; Warning</></entry></row><row><entry>1000</entry><entry>WARNING</entry><entry>warning</entry></row><row><entry>0100C</entry><entry>DYNAMIC RESULT SETS RETURNED</entry><entry>dynamic_result_sets_returned</entry></row><row><entry>1008</entry><entry>IMPLICIT ZERO BIT PADDING</entry><entry>implicit_zero_bit_padding</entry></row><row><entry>1003</entry><entry>NULL VALUE ELIMINATED IN SET FUNCTION</entry><entry>null_value_eliminated_in_set_function</entry></row><row><entry>1007</entry><entry>PRIVILEGE NOT GRANTED</entry><entry>privilege_not_granted</entry></row><row><entry>1006</entry><entry>PRIVILEGE NOT REVOKED</entry><entry>privilege_not_revoked</entry></row><row><entry>1004</entry><entry>STRING DATA RIGHT TRUNCATION</entry><entry>string_data_right_truncation</entry></row><row><entry>01P01</entry><entry>DEPRECATED FEATURE</entry><entry>deprecated_feature</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 02&mdash; No Data (this is also a warning class per the SQL standard)</></entry></row><row><entry>2000</entry><entry>NO DATA</entry><entry>no_data</entry></row><row><entry>2001</entry><entry>NO ADDITIONAL DYNAMIC RESULT SETS RETURNED</entry><entry>no_additional_dynamic_result_sets_returned</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 03&mdash; SQL Statement Not Yet Complete</></entry></row><row><entry>3000</entry><entry>SQL STATEMENT NOT YET COMPLETE</entry><entry>sql_statement_not_yet_complete</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 08&mdash; Connection Exception</></entry></row><row><entry>8000</entry><entry>CONNECTION EXCEPTION</entry><entry>connection_exception</entry></row><row><entry>8003</entry><entry>CONNECTION DOES NOT EXIST</entry><entry>connection_does_not_exist</entry></row><row><entry>8006</entry><entry>CONNECTION FAILURE</entry><entry>connection_failure</entry></row><row><entry>8001</entry><entry>SQLCLIENT UNABLE TO ESTABLISH SQLCONNECTION</entry><entry>sqlclient_unable_to_establish_sqlconnection</entry></row><row><entry>8004</entry><entry>SQLSERVER REJECTED ESTABLISHMENT OF SQLCONNECTION</entry><entry>sqlserver_rejected_establishment_of_sqlconnection</entry></row><row><entry>8007</entry><entry>TRANSACTION RESOLUTION UNKNOWN</entry><entry>transaction_resolution_unknown</entry></row><row><entry>08P01</entry><entry>PROTOCOL VIOLATION</entry><entry>protocol_violation</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 09&mdash; Triggered Action Exception</></entry></row><row><entry>9000</entry><entry>TRIGGERED ACTION EXCEPTION</entry><entry>triggered_action_exception</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 0A&mdash; Feature Not Supported</></entry></row><row><entry>0A000</entry><entry>FEATURE NOT SUPPORTED</entry><entry>feature_not_supported</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 0B&mdash; Invalid Transaction Initiation</></entry></row><row><entry>0B000</entry><entry>INVALID TRANSACTION INITIATION</entry><entry>invalid_transaction_initiation</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 0F&mdash; Locator Exception</></entry></row><row><entry>0F000</entry><entry>LOCATOR EXCEPTION</entry><entry>locator_exception</entry></row><row><entry>0F001</entry><entry>INVALID LOCATOR SPECIFICATION</entry><entry>invalid_locator_specification</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 0L&mdash; Invalid Grantor</></entry></row><row><entry>0L000</entry><entry>INVALID GRANTOR</entry><entry>invalid_grantor</entry></row><row><entry>0LP01</entry><entry>INVALID GRANT OPERATION</entry><entry>invalid_grant_operation</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 0P&mdash; Invalid Role Specification</></entry></row><row><entry>0P000</entry><entry>INVALID ROLE SPECIFICATION</entry><entry>invalid_role_specification</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 21&mdash; Cardinality Violation</></entry></row><row><entry>21000</entry><entry>CARDINALITY VIOLATION</entry><entry>cardinality_violation</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 22&mdash; Data Exception</></entry></row><row><entry>22000</entry><entry>DATA EXCEPTION</entry><entry>data_exception</entry></row><row><entry>2202E</entry><entry>ARRAY SUBSCRIPT ERROR</entry><entry>array_subscript_error</entry></row><row><entry>22021</entry><entry>CHARACTER NOT IN REPERTOIRE</entry><entry>character_not_in_repertoire</entry></row><row><entry>22008</entry><entry>DATETIME FIELD OVERFLOW</entry><entry>datetime_field_overflow</entry></row><row><entry>22012</entry><entry>DIVISION BY ZERO</entry><entry>division_by_zero</entry></row><row><entry>22005</entry><entry>ERROR IN ASSIGNMENT</entry><entry>error_in_assignment</entry></row><row><entry>2200B</entry><entry>ESCAPE CHARACTER CONFLICT</entry><entry>escape_character_conflict</entry></row><row><entry>22022</entry><entry>INDICATOR OVERFLOW</entry><entry>indicator_overflow</entry></row><row><entry>22015</entry><entry>INTERVAL FIELD OVERFLOW</entry><entry>interval_field_overflow</entry></row><row><entry>2201E</entry><entry>INVALID ARGUMENT FOR LOGARITHM</entry><entry>invalid_argument_for_logarithm</entry></row><row><entry>2201F</entry><entry>INVALID ARGUMENT FOR POWER FUNCTION</entry><entry>invalid_argument_for_power_function</entry></row><row><entry>2201G</entry><entry>INVALID ARGUMENT FOR WIDTH BUCKET FUNCTION</entry><entry>invalid_argument_for_width_bucket_function</entry></row><row><entry>22018</entry><entry>INVALID CHARACTER VALUE FOR CAST</entry><entry>invalid_character_value_for_cast</entry></row><row><entry>22007</entry><entry>INVALID DATETIME FORMAT</entry><entry>invalid_datetime_format</entry></row><row><entry>22019</entry><entry>INVALID ESCAPE CHARACTER</entry><entry>invalid_escape_character</entry></row><row><entry>2200D</entry><entry>INVALID ESCAPE OCTET</entry><entry>invalid_escape_octet</entry></row><row><entry>22025</entry><entry>INVALID ESCAPE SEQUENCE</entry><entry>invalid_escape_sequence</entry></row><row><entry>22P06</entry><entry>NONSTANDARD USE OF ESCAPE CHARACTER</entry><entry>nonstandard_use_of_escape_character</entry></row><row><entry>22010</entry><entry>INVALID INDICATOR PARAMETER VALUE</entry><entry>invalid_indicator_parameter_value</entry></row><row><entry>22020</entry><entry>INVALID LIMIT VALUE</entry><entry>invalid_limit_value</entry></row><row><entry>22023</entry><entry>INVALID PARAMETER VALUE</entry><entry>invalid_parameter_value</entry></row><row><entry>2201B</entry><entry>INVALID REGULAR EXPRESSION</entry><entry>invalid_regular_expression</entry></row><row><entry>22009</entry><entry>INVALID TIME ZONE DISPLACEMENT VALUE</entry><entry>invalid_time_zone_displacement_value</entry></row><row><entry>2200C</entry><entry>INVALID USE OF ESCAPE CHARACTER</entry><entry>invalid_use_of_escape_character</entry></row><row><entry>2200G</entry><entry>MOST SPECIFIC TYPE MISMATCH</entry><entry>most_specific_type_mismatch</entry></row><row><entry>22004</entry><entry>NULL VALUE NOT ALLOWED</entry><entry>null_value_not_allowed</entry></row><row><entry>22002</entry><entry>NULL VALUE NO INDICATOR PARAMETER</entry><entry>null_value_no_indicator_parameter</entry></row><row><entry>22003</entry><entry>NUMERIC VALUE OUT OF RANGE</entry><entry>numeric_value_out_of_range</entry></row><row><entry>22026</entry><entry>STRING DATA LENGTH MISMATCH</entry><entry>string_data_length_mismatch</entry></row><row><entry>22001</entry><entry>STRING DATA RIGHT TRUNCATION</entry><entry>string_data_right_truncation</entry></row><row><entry>22011</entry><entry>SUBSTRING ERROR</entry><entry>substring_error</entry></row><row><entry>22027</entry><entry>TRIM ERROR</entry><entry>trim_error</entry></row><row><entry>22024</entry><entry>UNTERMINATED C STRING</entry><entry>unterminated_c_string</entry></row><row><entry>2200F</entry><entry>ZERO LENGTH CHARACTER STRING</entry><entry>zero_length_character_string</entry></row><row><entry>22P01</entry><entry>FLOATING POINT EXCEPTION</entry><entry>floating_point_exception</entry></row><row><entry>22P02</entry><entry>INVALID TEXT REPRESENTATION</entry><entry>invalid_text_representation</entry></row><row><entry>22P03</entry><entry>INVALID BINARY REPRESENTATION</entry><entry>invalid_binary_representation</entry></row><row><entry>22P04</entry><entry>BAD COPY FILE FORMAT</entry><entry>bad_copy_file_format</entry></row><row><entry>22P05</entry><entry>UNTRANSLATABLE CHARACTER</entry><entry>untranslatable_character</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 23&mdash; Integrity Constraint Violation</></entry></row><row><entry>23000</entry><entry>INTEGRITY CONSTRAINT VIOLATION</entry><entry>integrity_constraint_violation</entry></row><row><entry>23001</entry><entry>RESTRICT VIOLATION</entry><entry>restrict_violation</entry></row><row><entry>23502</entry><entry>NOT NULL VIOLATION</entry><entry>not_null_violation</entry></row><row><entry>23503</entry><entry>FOREIGN KEY VIOLATION</entry><entry>foreign_key_violation</entry></row><row><entry>23505</entry><entry>UNIQUE VIOLATION</entry><entry>unique_violation</entry></row><row><entry>23514</entry><entry>CHECK VIOLATION</entry><entry>check_violation</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 24&mdash; Invalid Cursor State</></entry></row><row><entry>24000</entry><entry>INVALID CURSOR STATE</entry><entry>invalid_cursor_state</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 25&mdash; Invalid Transaction State</></entry></row><row><entry>25000</entry><entry>INVALID TRANSACTION STATE</entry><entry>invalid_transaction_state</entry></row><row><entry>25001</entry><entry>ACTIVE SQL TRANSACTION</entry><entry>active_sql_transaction</entry></row><row><entry>25002</entry><entry>BRANCH TRANSACTION ALREADY ACTIVE</entry><entry>branch_transaction_already_active</entry></row><row><entry>25008</entry><entry>HELD CURSOR REQUIRES SAME ISOLATION LEVEL</entry><entry>held_cursor_requires_same_isolation_level</entry></row><row><entry>25003</entry><entry>INAPPROPRIATE ACCESS MODE FOR BRANCH TRANSACTION</entry><entry>inappropriate_access_mode_for_branch_transaction</entry></row><row><entry>25004</entry><entry>INAPPROPRIATE ISOLATION LEVEL FOR BRANCH TRANSACTION</entry><entry>inappropriate_isolation_level_for_branch_transaction</entry></row><row><entry>25005</entry><entry>NO ACTIVE SQL TRANSACTION FOR BRANCH TRANSACTION</entry><entry>no_active_sql_transaction_for_branch_transaction</entry></row><row><entry>25006</entry><entry>READ ONLY SQL TRANSACTION</entry><entry>read_only_sql_transaction</entry></row><row><entry>25007</entry><entry>SCHEMA AND DATA STATEMENT MIXING NOT SUPPORTED</entry><entry>schema_and_data_statement_mixing_not_supported</entry></row><row><entry>25P01</entry><entry>NO ACTIVE SQL TRANSACTION</entry><entry>no_active_sql_transaction</entry></row><row><entry>25P02</entry><entry>IN FAILED SQL TRANSACTION</entry><entry>in_failed_sql_transaction</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 26&mdash; Invalid SQL Statement Name</></entry></row><row><entry>26000</entry><entry>INVALID SQL STATEMENT NAME</entry><entry>invalid_sql_statement_name</entry></row><row><entry spanname="span13"><emphasis role="bold">Class 27&mdash; Triggered Data Change Violation</></entry></row><row><entry>27000</entry><entry>TRIGGERED DATA CHANGE VIOLATION</entry><entry>triggered_data_change_violation</entry>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -