Skip to content

Commit 7dd193a

Browse files
committed
errorcodes map and errors classes updated to PostgreSQL 14.
1 parent 1a0c02a commit 7dd193a

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Current release
44
What's new in psycopg 2.9.2
55
^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
Raise `ValueError` for dates >= Y10k (:ticket:`#1307`)
7+
- Raise `ValueError` for dates >= Y10k (:ticket:`#1307`).
8+
- `~psycopg2.errorcodes` map and `~psycopg2.errors` classes updated to
9+
PostgreSQL 14.
810

911

1012
What's new in psycopg 2.9.1

lib/errorcodes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def lookup(code, _cache={}):
391391
CRASH_SHUTDOWN = '57P02'
392392
CANNOT_CONNECT_NOW = '57P03'
393393
DATABASE_DROPPED = '57P04'
394+
IDLE_SESSION_TIMEOUT = '57P05'
394395

395396
# Class 58 - System Error (errors external to PostgreSQL itself)
396397
SYSTEM_ERROR = '58000'

psycopg/sqlstate_errors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@
279279
{"57P02", "CrashShutdown"},
280280
{"57P03", "CannotConnectNow"},
281281
{"57P04", "DatabaseDropped"},
282+
{"57P05", "IdleSessionTimeout"},
282283

283284
/* Class 58 - System Error (errors external to PostgreSQL itself) */
284285
{"58000", "SystemError"},

scripts/make_errorcodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main():
3333
file_start = read_base_file(filename)
3434
# If you add a version to the list fix the docs (in errorcodes.rst)
3535
classes, errors = fetch_errors(
36-
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13'])
36+
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14'])
3737

3838
disambiguate(errors)
3939

scripts/make_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main():
3030

3131
# If you add a version to the list fix the docs (in errors.rst)
3232
classes, errors = fetch_errors(
33-
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13'])
33+
['9.1', '9.2', '9.3', '9.4', '9.5', '9.6', '10', '11', '12', '13', '14'])
3434

3535
f = open(filename, "w")
3636
print("/*\n * Autogenerated by 'scripts/make_errors.py'.\n */\n", file=f)

0 commit comments

Comments
 (0)