X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-postgresql%2Fpostgresql-api.lisp;h=c0b8a000edd9e2ac75eb61b579cab6758426d5f9;hp=b006bf655a733f89f12dd06d1f8965c3ad01655e;hb=d2d49ab13c98bc7a1819a0fd3968268a5567bdc3;hpb=eb52183ddb786552d5abf6fdfaaca657e0c56ea0 diff --git a/db-postgresql/postgresql-api.lisp b/db-postgresql/postgresql-api.lisp index b006bf6..c0b8a00 100644 --- a/db-postgresql/postgresql-api.lisp +++ b/db-postgresql/postgresql-api.lisp @@ -4,12 +4,10 @@ ;;;; ;;;; Name: postgresql.cl ;;;; Purpose: Low-level PostgreSQL interface using UFFI -;;;; Programmers: Kevin M. Rosenberg based on -;;;; Original code by Pierre R. Mai +;;;; Programmers: Kevin M. Rosenberg based on +;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai ;;;; @@ -18,7 +16,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(in-package #:postgresql) +(in-package #:pgsql) ;;;; This file implements as little of the FFI bindings to the @@ -35,7 +33,7 @@ (uffi:def-foreign-type pgsql-oid :unsigned-int) -(uffi:def-enum pgsql-conn-status-type +(uffi:def-enum pgsql-conn-status-type (:connection-ok :connection-bad)) @@ -61,7 +59,7 @@ (:int8 20) (:float4 700) (:float8 701))) - + ;;(declaim (inline PQsetdbLogin)) ;; causes compile error in LW 4.2.0 (uffi:def-function ("PQsetdbLogin" PQsetdbLogin) ((pghost :cstring) @@ -138,7 +136,7 @@ ((res pgsql-result) (field-code :int)) :module "postgresql" - :returning (* char)) + :returning :cstring) (declaim (inline PQresultErrorMessage)) (uffi:def-function ("PQresultErrorMessage" PQresultErrorMessage) @@ -147,7 +145,7 @@ :returning :cstring) (declaim (inline PQntuples)) -(uffi:def-function ("PQntuples" PQntuples) +(uffi:def-function ("PQntuples" PQntuples) ((res pgsql-result)) :module "postgresql" :returning :int)