X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=interfaces%2Fpostgresql%2Fpostgresql-sql.cl;h=eca4b293f4440dd3dcb2563ecbaa790e6c945eb0;hb=b06cb6d32e2a334f7dc72e8fb583a5b9609136b7;hp=cb83a348b0cfe0a637cdf0042e008ceeef6ca8bd;hpb=d122a92fea03b34e179ffc58d7c4f18d7e5d10c9;p=clsql.git diff --git a/interfaces/postgresql/postgresql-sql.cl b/interfaces/postgresql/postgresql-sql.cl index cb83a34..eca4b29 100644 --- a/interfaces/postgresql/postgresql-sql.cl +++ b/interfaces/postgresql/postgresql-sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-sql.cl,v 1.1 2002/03/23 14:04:53 kevin Exp $ +;;;; $Id: postgresql-sql.cl,v 1.2 2002/03/23 17:07:40 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -68,30 +68,30 @@ (host db user password &optional port options tty)) (destructuring-bind (host db user password &optional port options tty) connection-spec - (uffi:with-cstring (host-native host) - (uffi:with-cstring (user-native user) - (uffi:with-cstring (password-native password) - (uffi:with-cstring (db-native db) - (uffi:with-cstring (port-native port) - (uffi:with-cstring (options-native options) - (uffi:with-cstring (tty-native tty) - (let ((connection (PQsetdbLogin host-native port-native - options-native tty-native - db-native user-native - password-native))) - (declare (type pgsql-conn-def connection)) - (when (not (eq (PQstatus connection) - pgsql-conn-status-type#connection-ok)) - (error 'clsql-connect-error - :database-type database-type - :connection-spec connection-spec - :errno (PQstatus connection) - :error (tidy-error-message - (PQerrorMessage connection)))) - (make-instance 'postgresql-database - :name (database-name-from-spec connection-spec - database-type) - :conn-ptr connection))))))))))) + (uffi:with-cstrings ((host-native host) + (user-native user) + (password-native password) + (db-native db) + (port-native port) + (options-native options) + (tty-native tty)) + (let ((connection (PQsetdbLogin host-native port-native + options-native tty-native + db-native user-native + password-native))) + (declare (type pgsql-conn-def connection)) + (when (not (eq (PQstatus connection) + pgsql-conn-status-type#connection-ok)) + (error 'clsql-connect-error + :database-type database-type + :connection-spec connection-spec + :errno (PQstatus connection) + :error (tidy-error-message + (PQerrorMessage connection)))) + (make-instance 'postgresql-database + :name (database-name-from-spec connection-spec + database-type) + :conn-ptr connection))))) (defmethod database-disconnect ((database postgresql-database))