Permalink
Browse files

errorcodes map updated to PostgreSQL 9.2

  • Loading branch information...
1 parent 526e270 commit 7de86116074d1a0bd630e7222355cbfa1055e484 @dvarrazzo committed Sep 21, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −0 NEWS
  2. +7 −0 lib/errorcodes.py
  3. +2 −1 scripts/make_errorcodes.py
View
@@ -13,6 +13,7 @@ What's new in psycopg 2.4.6
Thanks to Manu Cupcic for the report (ticket #110).
- 'register_hstore()', 'register_composite()', 'tpc_recover()' work with
RealDictConnection and Cursor (ticket #114).
+ - 'errorcodes' map updated to PostgreSQL 9.2.
What's new in psycopg 2.4.5
View
@@ -59,6 +59,7 @@ def lookup(code, _cache={}):
CLASS_LOCATOR_EXCEPTION = '0F'
CLASS_INVALID_GRANTOR = '0L'
CLASS_INVALID_ROLE_SPECIFICATION = '0P'
+CLASS_DIAGNOSTICS_EXCEPTION = '0Z'
CLASS_CASE_NOT_FOUND = '20'
CLASS_CARDINALITY_VIOLATION = '21'
CLASS_DATA_EXCEPTION = '22'
@@ -139,6 +140,10 @@ def lookup(code, _cache={}):
# Class 0P - Invalid Role Specification
INVALID_ROLE_SPECIFICATION = '0P000'
+# Class 0Z - Diagnostics Exception
+DIAGNOSTICS_EXCEPTION = '0Z000'
+STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER = '0Z002'
+
# Class 20 - Case Not Found
CASE_NOT_FOUND = '20000'
@@ -331,6 +336,7 @@ def lookup(code, _cache={}):
DISK_FULL = '53100'
OUT_OF_MEMORY = '53200'
TOO_MANY_CONNECTIONS = '53300'
+CONFIGURATION_LIMIT_EXCEEDED = '53400'
# Class 54 - Program Limit Exceeded
PROGRAM_LIMIT_EXCEEDED = '54000'
@@ -353,6 +359,7 @@ def lookup(code, _cache={}):
DATABASE_DROPPED = '57P04'
# Class 58 - System Error (errors external to PostgreSQL itself)
+SYSTEM_ERROR = '58000'
IO_ERROR = '58030'
UNDEFINED_FILE = '58P01'
DUPLICATE_FILE = '58P02'
@@ -30,7 +30,8 @@ def main():
filename = sys.argv[1]
file_start = read_base_file(filename)
- classes, errors = fetch_errors(['8.1', '8.2', '8.3', '8.4', '9.0', '9.1'])
+ classes, errors = fetch_errors(
+ ['8.1', '8.2', '8.3', '8.4', '9.0', '9.1', '9.2'])
f = open(filename, "w")
for line in file_start:

0 comments on commit 7de8611

Please sign in to comment.