From: Russ Tyndall Date: Fri, 2 Oct 2009 20:31:49 +0000 (-0400) Subject: fixed a recurring redefinition problem in cl-postgresql-socket3 X-Git-Url: http://git.kpe.io/?a=commitdiff_plain;ds=sidebyside;h=539444af449f3769b75f71b32f10204c40d011f4;p=clsql.git fixed a recurring redefinition problem in cl-postgresql-socket3 --- diff --git a/db-postgresql-socket3/package.lisp b/db-postgresql-socket3/package.lisp index f2ff368..430b2eb 100644 --- a/db-postgresql-socket3/package.lisp +++ b/db-postgresql-socket3/package.lisp @@ -22,6 +22,7 @@ (defpackage #:postgresql-socket3 (:use #:cl md5 #:cl-postgres) + (:shadow #:postgresql-warning) (:export #:+postgresql-server-default-port+ #:postgresql-condition #:postgresql-error diff --git a/db-postgresql-socket3/sql.lisp b/db-postgresql-socket3/sql.lisp index 04b1897..6fdef8e 100644 --- a/db-postgresql-socket3/sql.lisp +++ b/db-postgresql-socket3/sql.lisp @@ -58,11 +58,11 @@ (ecase *backend-warning-behavior* (:warn (warn 'sql-database-warning :database database - :message (postgresql-condition-message condition))) + :message (cl-postgres:database-error-message condition))) (:error (error 'sql-database-error :database database :message (format nil "Warning upgraded to error: ~A" - (postgresql-condition-message condition)))) + (cl-postgres:database-error-message condition)))) ((:ignore nil) ;; do nothing ))) @@ -72,7 +72,7 @@ :database database :expression expression :error-id (type-of condition) - :message (postgresql-condition-message condition))) + :message (cl-postgres:database-error-message condition))) (defmacro with-postgresql-handlers ((database &optional expression) @@ -84,7 +84,7 @@ (handler-bind ((postgresql-warning (lambda (c) (convert-to-clsql-warning ,database-var c))) - (postgresql-error + (cl-postgres:database-error (lambda (c) (convert-to-clsql-error ,database-var ,expression-var c)))) @@ -142,7 +142,7 @@ :database-type database-type :connection-spec connection-spec :error-id (type-of c) - :message (postgresql-condition-message c))) + :message (cl-postgres:database-error-message c))) (:no-error (connection) ;; Success, make instance (make-instance 'postgresql-socket3-database