summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-14 22:57:01 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-14 22:57:01 +0100
commit1de7d53fb1cc0163f24e2b8bcf3e6bab0e1072d4 (patch)
tree96bc14fa30f5a06ccf51e602ca3f25ecf9ad1f30
parentba9f37022a4cd7db13c2a32d800ac7136dcaeea4 (diff)
downloadpsycopg2-1de7d53fb1cc0163f24e2b8bcf3e6bab0e1072d4.tar.gz
errorcodes map update to PostgreSQL 11
-rw-r--r--NEWS1
-rw-r--r--doc/src/errorcodes.rst2
-rw-r--r--lib/errorcodes.py1
-rwxr-xr-xscripts/make_errorcodes.py4
4 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 12c06a2..7b13cd1 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/doc/src/errorcodes.rst b/doc/src/errorcodes.rst
index f5f2fa8..7ca3177 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 24fcf25..be4ffd5 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 1769ba5..db1ec36 100755
--- a/scripts/make_errorcodes.py
+++ b/scripts/make_errorcodes.py
@@ -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'