errorcodes map update to PostgreSQL 11

This commit is contained in:
Daniele Varrazzo 2018-10-14 22:57:01 +01:00
parent ba9f37022a
commit 1de7d53fb1
4 changed files with 5 additions and 3 deletions

1
NEWS
View File

@ -10,6 +10,7 @@ What's new in psycopg 2.7.6
- Fixed hang trying to :sql:`COPY` via `~cursor.execute()` (:ticket:`#781`).
- Fixed segfault accessing the `connection.readonly` and
`connection.deferrable` repeatedly (:ticket:`#790`).
- `~psycopg2.errorcodes` map updated to PostgreSQL 11.
What's new in psycopg 2.7.5

View File

@ -50,7 +50,7 @@ An example of the available constants defined in the module:
'42P01'
Constants representing all the error values defined by PostgreSQL versions
between 8.1 and 10 are included in the module.
between 8.1 and 11 are included in the module.
.. autofunction:: lookup(code)

View File

@ -182,6 +182,7 @@ INVALID_XML_PROCESSING_INSTRUCTION = '2200T'
INVALID_INDICATOR_PARAMETER_VALUE = '22010'
SUBSTRING_ERROR = '22011'
DIVISION_BY_ZERO = '22012'
INVALID_PRECEDING_OR_FOLLOWING_SIZE = '22013'
INVALID_ARGUMENT_FOR_NTILE_FUNCTION = '22014'
INTERVAL_FIELD_OVERFLOW = '22015'
INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION = '22016'

View File

@ -35,7 +35,7 @@ def main():
# If you add a version to the list fix the docs (in errorcodes.rst)
classes, errors = fetch_errors(
['8.1', '8.2', '8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5',
'9.6', '10'])
'9.6', '10', '11'])
f = open(filename, "w")
for line in file_start:
@ -154,7 +154,7 @@ def fetch_errors(versions):
# TODO: this error was added in PG 10 beta 1 but dropped in the
# final release. It doesn't harm leaving it in the file. Check if it
# will be added back in PG 11.
# will be added back in PG 12.
# https://github.com/postgres/postgres/commit/28e0727076
errors['55']['55P04'] = 'UNSAFE_NEW_ENUM_VALUE_USAGE'