Skip to content

Commit

Permalink
errorcodes map updated to PostgreSQL 9.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Jul 1, 2016
1 parent 7566af1 commit 90ee1eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ What's new in psycopg 2.6.2
- Fixed `!errorcodes.lookup` initialization thread-safety (:ticket:`#382`).
- Fixed `!read()` exception propagation in copy_from (:ticket:`#412`).
- Fixed possible NULL TZ decref (:ticket:`#424`).
- `~psycopg2.errorcodes` map updated to PostgreSQL 9.5.


What's new in psycopg 2.6.1
Expand Down
4 changes: 4 additions & 0 deletions lib/errorcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ def lookup(code, _cache={}):
STRING_DATA_LENGTH_MISMATCH = '22026'
TRIM_ERROR = '22027'
ARRAY_SUBSCRIPT_ERROR = '2202E'
INVALID_TABLESAMPLE_REPEAT = '2202G'
INVALID_TABLESAMPLE_ARGUMENT = '2202H'
FLOATING_POINT_EXCEPTION = '22P01'
INVALID_TEXT_REPRESENTATION = '22P02'
INVALID_BINARY_REPRESENTATION = '22P03'
Expand Down Expand Up @@ -271,6 +273,7 @@ def lookup(code, _cache={}):
NULL_VALUE_NOT_ALLOWED = '39004'
TRIGGER_PROTOCOL_VIOLATED = '39P01'
SRF_PROTOCOL_VIOLATED = '39P02'
EVENT_TRIGGER_PROTOCOL_VIOLATED = '39P03'

# Class 3B - Savepoint Exception
SAVEPOINT_EXCEPTION = '3B000'
Expand Down Expand Up @@ -408,6 +411,7 @@ def lookup(code, _cache={}):
RAISE_EXCEPTION = 'P0001'
NO_DATA_FOUND = 'P0002'
TOO_MANY_ROWS = 'P0003'
ASSERT_FAILURE = 'P0004'

# Class XX - Internal Error
INTERNAL_ERROR = 'XX000'
Expand Down
2 changes: 1 addition & 1 deletion scripts/make_errorcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def main():
file_start = read_base_file(filename)
# If you add a version to the list fix the docs (errorcodes.rst, err.rst)
classes, errors = fetch_errors(
['8.1', '8.2', '8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4'])
['8.1', '8.2', '8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5'])

f = open(filename, "w")
for line in file_start:
Expand Down

0 comments on commit 90ee1eb

Please sign in to comment.