mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-02 23:35:46 +03:00
chore: upgrade error codes to PostgreSQL 15
This commit is contained in:
parent
6d815f5df9
commit
29a65f756c
2
NEWS
2
NEWS
|
@ -4,6 +4,8 @@ What's new in psycopg 2.9.4 (unreleased)
|
|||
- Fix `register_composite()`, `register_range()` with customized search_path
|
||||
(:ticket:`#1487`).
|
||||
- Handle correctly composite types with names or in schemas requiring escape.
|
||||
- `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
|
||||
PostgreSQL 15.
|
||||
|
||||
|
||||
Current release
|
||||
|
|
|
@ -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 13 are included in the module.
|
||||
between 8.1 and 15 are included in the module.
|
||||
|
||||
|
||||
.. autofunction:: lookup(code)
|
||||
|
|
|
@ -14,11 +14,15 @@
|
|||
|
||||
.. versionchanged:: 2.8.6 added errors introduced in PostgreSQL 13
|
||||
|
||||
.. versionchanged:: 2.9.2 added errors introduced in PostgreSQL 14
|
||||
|
||||
.. versionchanged:: 2.9.4 added errors introduced in PostgreSQL 15
|
||||
|
||||
This module exposes the classes psycopg raises upon receiving an error from
|
||||
the database with a :sql:`SQLSTATE` value attached (available in the
|
||||
`~psycopg2.Error.pgcode` attribute). The content of the module is generated
|
||||
from the PostgreSQL source code and includes classes for every error defined
|
||||
by PostgreSQL in versions between 9.1 and 13.
|
||||
by PostgreSQL in versions between 9.1 and 15.
|
||||
|
||||
Every class in the module is named after what referred as "condition name" `in
|
||||
the documentation`__, converted to CamelCase: e.g. the error 22012,
|
||||
|
|
|
@ -132,7 +132,7 @@ The current `!psycopg2` implementation supports:
|
|||
NOTE: keep consistent with setup.py and the /features/ page.
|
||||
|
||||
- Python versions from 3.6 to 3.10
|
||||
- PostgreSQL server versions from 7.4 to 14
|
||||
- PostgreSQL server versions from 7.4 to 15
|
||||
- PostgreSQL client library version from 9.1
|
||||
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ SQL_JSON_OBJECT_NOT_FOUND = '2203C'
|
|||
TOO_MANY_JSON_ARRAY_ELEMENTS = '2203D'
|
||||
TOO_MANY_JSON_OBJECT_MEMBERS = '2203E'
|
||||
SQL_JSON_SCALAR_REQUIRED = '2203F'
|
||||
SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE = '2203G'
|
||||
FLOATING_POINT_EXCEPTION = '22P01'
|
||||
INVALID_TEXT_REPRESENTATION = '22P02'
|
||||
INVALID_BINARY_REPRESENTATION = '22P03'
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
{"2203D", "TooManyJsonArrayElements"},
|
||||
{"2203E", "TooManyJsonObjectMembers"},
|
||||
{"2203F", "SqlJsonScalarRequired"},
|
||||
{"2203G", "SqlJsonItemCannotBeCastToTargetType"},
|
||||
{"22P01", "FloatingPointException"},
|
||||
{"22P02", "InvalidTextRepresentation"},
|
||||
{"22P03", "InvalidBinaryRepresentation"},
|
||||
|
|
|
@ -33,7 +33,7 @@ def main():
|
|||
file_start = read_base_file(filename)
|
||||
# If you add a version to the list fix the docs (in errorcodes.rst)
|
||||
classes, errors = fetch_errors(
|
||||
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14'])
|
||||
'9.1 9.2 9.3 9.4 9.5 9.6 10 11 12 13 14 15'.split())
|
||||
|
||||
disambiguate(errors)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ def main():
|
|||
|
||||
# If you add a version to the list fix the docs (in errors.rst)
|
||||
classes, errors = fetch_errors(
|
||||
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14'])
|
||||
'9.1 9.2 9.3 9.4 9.5 9.6 10 11 12 13 14 15'.split())
|
||||
|
||||
f = open(filename, "w")
|
||||
print("/*\n * Autogenerated by 'scripts/make_errors.py'.\n */\n", file=f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user