branch: elpa/pg
commit 77f883aa8914f6585d284dd335ddf340ff38bd46
Author: Eric Marsden <[email protected]>
Commit: Eric Marsden <[email protected]>

    New error type pg-dependent-objects-still-exist.
---
 CHANGELOG.md | 3 ++-
 pg.el        | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 179ea54667..3b939d131f 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,8 @@
 - Expose the latest `ReadyForQuery` transaction status on connections via 
`pgcon-transaction-status`
   (patch from @LuciusChen).
 
-- New error types `pg-bad-copy-file-format` and `pg-protocol-violation`.
+- New error types `pg-bad-copy-file-format`, `pg-protocol-violation` and
+  `pg-dependent-objects-still-exist`.
 
 - The SQLSTATE value supplied by PostgreSQL is reported when an error is 
signaled, to help the user
   find documentation on the exact error type.
diff --git a/pg.el b/pg.el
index 44f35a988c..1172ca265f 100644
--- a/pg.el
+++ b/pg.el
@@ -206,6 +206,7 @@ SQL queries. To avoid this overhead on establishing a 
connection, remove
 (define-error 'pg-disk-full "PostgreSQL disk full error" 'pg-operational-error)
 (define-error 'pg-too-many-connections "PostgreSQL too many connections" 
'pg-operational-error)
 (define-error 'pg-plpgsql-error "PostgreSQL PL/pgSQL error" 
'pg-programming-error)
+(define-error 'pg-dependent-objects-still-exist "PostgreSQL dependent objects 
still exist" 'pg-operational-error)
 
 (defun pg-signal-type-error (fmt &rest arguments)
   (let ((msg (apply #'format fmt arguments)))
@@ -703,6 +704,7 @@ presented to the user."
                         ((pred (lambda (v) (string-prefix-p "23" v))) 
'pg-integrity-error)
                         ("25P01" 'pg-transaction-missing)
                         ("25P04" 'pg-transaction-timeout)
+                        ("2BP01" 'pg-dependent-objects-still-exist)
                         ((pred (lambda (v) (string-prefix-p "2F" v))) 
'pg-programming-error)
                         ((pred (lambda (v) (string-prefix-p "38" v))) 
'pg-programming-error)
                         ((pred (lambda (v) (string-prefix-p "39" v))) 
'pg-programming-error)

Reply via email to