Remove CVS $Id$ keyword
[clsql.git] / db-postgresql / postgresql-sql.lisp
index de6daf53c586d2f5c6ee44638e155660483a6c7f..aad11a0c2aeb1d764be584c50cb551b9e00e13d3 100644 (file)
@@ -6,8 +6,6 @@
 ;;;; Purpose:       High-level PostgreSQL interface using UFFI
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id$
-;;;;
 ;;;; CLSQL users are granted the rights to distribute and use this software
 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
                (error 'sql-database-data-error
                       :database database
                       :expression query-expression
-                      :error-id (PQresultStatus result)
+                      :error-id (PQresultErrorField result +PG-DIAG-SQLSTATE+)
                       :message (tidy-error-message
                                 (PQresultErrorMessage result)))))
           (PQclear result))))))
                (error 'sql-database-data-error
                       :database database
                       :expression query-expression
-                      :error-id (PQresultStatus result)
+                      :error-id (PQresultErrorField result +PG-DIAG-SQLSTATE+)
                       :message (tidy-error-message
                                 (PQresultErrorMessage result)))
              (PQclear result))))))))