diff --git a/NEWS b/NEWS index 0a5f3dc0..ed26a445 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,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 diff --git a/doc/src/errorcodes.rst b/doc/src/errorcodes.rst index 510d0f22..f852aa65 100644 --- a/doc/src/errorcodes.rst +++ b/doc/src/errorcodes.rst @@ -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) diff --git a/lib/errorcodes.py b/lib/errorcodes.py index 99a6ecd5..beee37ce 100644 --- a/lib/errorcodes.py +++ b/lib/errorcodes.py @@ -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' diff --git a/scripts/make_errorcodes.py b/scripts/make_errorcodes.py index d85e6b83..1b3f594e 100755 --- a/scripts/make_errorcodes.py +++ b/scripts/make_errorcodes.py @@ -36,7 +36,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: @@ -155,7 +155,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'