summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-05 12:26:29 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-05 12:34:17 +0100
commit89169e6e53aaab9a0716b81e1660a4c49dc0cb16 (patch)
treedb5318f63b0604bad5bbd03bdb13cfe074241385
parent75d84f0b25a9b165e3c2f6977f6726d9b010a173 (diff)
downloadpsycopg2-89169e6e53aaab9a0716b81e1660a4c49dc0cb16.tar.gz
Error codes updated to PG 10 beta 1
-rw-r--r--lib/errorcodes.py3
-rwxr-xr-xscripts/make_errorcodes.py14
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/errorcodes.py b/lib/errorcodes.py
index 150d2f0..24fcf25 100644
--- a/lib/errorcodes.py
+++ b/lib/errorcodes.py
@@ -173,6 +173,7 @@ INVALID_USE_OF_ESCAPE_CHARACTER = '2200C'
INVALID_ESCAPE_OCTET = '2200D'
ZERO_LENGTH_CHARACTER_STRING = '2200F'
MOST_SPECIFIC_TYPE_MISMATCH = '2200G'
+SEQUENCE_GENERATOR_LIMIT_EXCEEDED = '2200H'
NOT_AN_XML_DOCUMENT = '2200L'
INVALID_XML_DOCUMENT = '2200M'
INVALID_XML_CONTENT = '2200N'
@@ -316,6 +317,7 @@ WRONG_OBJECT_TYPE = '42809'
INVALID_FOREIGN_KEY = '42830'
CANNOT_COERCE = '42846'
UNDEFINED_FUNCTION = '42883'
+GENERATED_ALWAYS = '428C9'
RESERVED_NAME = '42939'
UNDEFINED_TABLE = '42P01'
UNDEFINED_PARAMETER = '42P02'
@@ -361,6 +363,7 @@ OBJECT_NOT_IN_PREREQUISITE_STATE = '55000'
OBJECT_IN_USE = '55006'
CANT_CHANGE_RUNTIME_PARAM = '55P02'
LOCK_NOT_AVAILABLE = '55P03'
+UNSAFE_NEW_ENUM_VALUE_USAGE = '55P04'
# Class 57 - Operator Intervention
OPERATOR_INTERVENTION = '57000'
diff --git a/scripts/make_errorcodes.py b/scripts/make_errorcodes.py
index 3f96453..73aeed9 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 (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', '9.5',
- '9.6'])
+ '9.6', '10 b1'])
f = open(filename, "w")
for line in file_start:
@@ -133,7 +133,7 @@ errors_sgml_url = \
errors_txt_url = \
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;" \
- "f=src/backend/utils/errcodes.txt;hb=REL%s_STABLE"
+ "f=src/backend/utils/errcodes.txt;hb=%s"
def fetch_errors(versions):
@@ -142,12 +142,16 @@ def fetch_errors(versions):
for version in versions:
print >> sys.stderr, version
- tver = tuple(map(int, version.split('.')))
+ tver = tuple(map(int, version.split()[0].split('.')))
if tver < (9, 1):
c1, e1 = parse_errors_sgml(errors_sgml_url % version)
else:
- c1, e1 = parse_errors_txt(
- errors_txt_url % version.replace('.', '_'))
+ # TODO: move to 10 stable when released.
+ if version == '10 b1':
+ tag = 'REL_10_BETA1'
+ else:
+ tag = 'REL%s_STABLE' % version.replace('.', '_')
+ c1, e1 = parse_errors_txt(errors_txt_url % tag)
classes.update(c1)
for c, cerrs in e1.iteritems():
errors[c].update(cerrs)