X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-postgresql%2Fpostgresql-sql.lisp;h=0dc3f57d2a3e1585f89820d1fd4eb5cfa8a9c542;hb=a3112fd970a6f59efae544e9d939a50f1c1f7b23;hp=156e11e08c26abebb0c8863321b041bb9abff2d9;hpb=f716bb1161cf9e89a96945c4a444244f9d303691;p=clsql.git diff --git a/db-postgresql/postgresql-sql.lisp b/db-postgresql/postgresql-sql.lisp index 156e11e..0dc3f57 100644 --- a/db-postgresql/postgresql-sql.lisp +++ b/db-postgresql/postgresql-sql.lisp @@ -16,7 +16,7 @@ (in-package #:cl-user) (defpackage #:clsql-postgresql - (:use #:common-lisp #:clsql-base-sys #:postgresql #:clsql-uffi) + (:use #:common-lisp #:clsql-sys #:postgresql #:clsql-uffi) (:export #:postgresql-database) (:documentation "This is the CLSQL interface to PostgreSQL.")) @@ -192,7 +192,7 @@ (let ((names '())) (dotimes (i num-fields (nreverse names)) (declare (fixnum i)) - (push (uffi:convert-from-foreign-string (PQfname result i)) names)))) + (push (uffi:convert-from-cstring (PQfname result i)) names)))) (defmethod database-execute-command (sql-expression (database postgresql-database)) @@ -444,16 +444,15 @@ owner-clause) database nil nil)))) (if result - (reverse - (remove-if #'(lambda (it) (member it '("cmin" - "cmax" - "xmax" - "xmin" - "oid" - "ctid" - ;; kmr -- added tableoid - "tableoid") :test #'equal)) - result))))) + (remove-if #'(lambda (it) (member it '("cmin" + "cmax" + "xmax" + "xmin" + "oid" + "ctid" + ;; kmr -- added tableoid + "tableoid") :test #'equal)) + result)))) (defmethod database-attribute-type (attribute (table string) (database postgresql-database) @@ -520,7 +519,7 @@ (destructuring-bind (host name user password) connection-spec (declare (ignore user password)) (multiple-value-bind (output status) - (clsql-base-sys:command-output "createdb -h~A ~A" + (clsql-sys:command-output "createdb -h~A ~A" (if host host "localhost") name) (if (or (not (zerop status)) @@ -537,7 +536,7 @@ (destructuring-bind (host name user password) connection-spec (declare (ignore user password)) (multiple-value-bind (output status) - (clsql-base-sys:command-output "dropdb -h~A ~A" + (clsql-sys:command-output "dropdb -h~A ~A" (if host host "localhost") name) (if (or (not (zerop status)) @@ -563,12 +562,12 @@ type))) (unwind-protect (progn - (setf (slot-value database 'clsql-base-sys::state) :open) + (setf (slot-value database 'clsql-sys::state) :open) (mapcar #'car (database-query "select datname from pg_database" database nil nil))) (progn (database-disconnect database) - (setf (slot-value database 'clsql-base-sys::state) :closed)))))) + (setf (slot-value database 'clsql-sys::state) :closed)))))) (defmethod database-describe-table ((database postgresql-database) table) (database-query @@ -618,5 +617,5 @@ (defmethod db-type-default-case ((db-type (eql :postgresql))) :lower) -(when (clsql-base-sys:database-type-library-loaded :postgresql) - (clsql-base-sys:initialize-database-type :database-type :postgresql)) +(when (clsql-sys:database-type-library-loaded :postgresql) + (clsql-sys:initialize-database-type :database-type :postgresql))