Add a few missing errcodes

They are used in the code but not defined in the SGML docs so the script
failed to parse them.
This commit is contained in:
Daniele Varrazzo 2014-07-31 13:13:27 +01:00
parent 081bf843d2
commit 40dca9924d
3 changed files with 7 additions and 1 deletions

2
NEWS
View File

@ -16,6 +16,8 @@ What's new in psycopg 2.5.4
- Fixed segfault if COPY statements are executed instead of using the - Fixed segfault if COPY statements are executed instead of using the
proper methods (:ticket:`#219`). proper methods (:ticket:`#219`).
- Don't ignore silently the `cursor.callproc` argument without a length. - Don't ignore silently the `cursor.callproc` argument without a length.
- Added a few errors missing from `~psycopg2.errorcodes`, defined by
PostgreSQL but not documented.
What's new in psycopg 2.5.3 What's new in psycopg 2.5.3

View File

@ -49,7 +49,7 @@ An example of the available constants defined in the module:
>>> errorcodes.UNDEFINED_TABLE >>> errorcodes.UNDEFINED_TABLE
'42P01' '42P01'
Constants representing all the error values documented by PostgreSQL versions Constants representing all the error values defined by PostgreSQL versions
between 8.1 and 9.2 are included in the module. between 8.1 and 9.2 are included in the module.

View File

@ -284,6 +284,10 @@ STATEMENT_COMPLETION_UNKNOWN = '40003'
DEADLOCK_DETECTED = '40P01' DEADLOCK_DETECTED = '40P01'
# Class 42 - Syntax Error or Access Rule Violation # Class 42 - Syntax Error or Access Rule Violation
UNDEFINED_PSTATEMENT = '26000'
UNDEFINED_CURSOR = '34000'
UNDEFINED_DATABASE = '3D000'
UNDEFINED_SCHEMA = '3F000'
SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION = '42000' SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION = '42000'
INSUFFICIENT_PRIVILEGE = '42501' INSUFFICIENT_PRIVILEGE = '42501'
SYNTAX_ERROR = '42601' SYNTAX_ERROR = '42601'