summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--doc/src/errorcodes.rst2
-rw-r--r--lib/errorcodes.py4
3 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 63568de..9418d52 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ What's new in psycopg 2.5.4
- Fixed segfault if COPY statements are executed instead of using the
proper methods (:ticket:`#219`).
- Don't ignore silently the `cursor.callproc` argument without a length.
+- Added a few errors missing from `~psycopg2.errorcodes`, defined by
+ PostgreSQL but not documented.
What's new in psycopg 2.5.3
diff --git a/doc/src/errorcodes.rst b/doc/src/errorcodes.rst
index bfaaeb4..3fdd549 100644
--- a/doc/src/errorcodes.rst
+++ b/doc/src/errorcodes.rst
@@ -49,7 +49,7 @@ An example of the available constants defined in the module:
>>> errorcodes.UNDEFINED_TABLE
'42P01'
-Constants representing all the error values documented by PostgreSQL versions
+Constants representing all the error values defined by PostgreSQL versions
between 8.1 and 9.2 are included in the module.
diff --git a/lib/errorcodes.py b/lib/errorcodes.py
index 12c300f..e004cac 100644
--- a/lib/errorcodes.py
+++ b/lib/errorcodes.py
@@ -284,6 +284,10 @@ STATEMENT_COMPLETION_UNKNOWN = '40003'
DEADLOCK_DETECTED = '40P01'
# Class 42 - Syntax Error or Access Rule Violation
+UNDEFINED_PSTATEMENT = '26000'
+UNDEFINED_CURSOR = '34000'
+UNDEFINED_DATABASE = '3D000'
+UNDEFINED_SCHEMA = '3F000'
SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION = '42000'
INSUFFICIENT_PRIVILEGE = '42501'
SYNTAX_ERROR = '42601'