|
From: SOS S. <su...@gm...> - 2009-06-19 16:22:54
|
Hi Sam!
Thanks for the quick fix! When I wrote that original message, I
hadn't yet realized I'd stumbled upon a bug - I was going to write
another post stating that changing the function signature by replacing
size_t with int was a (non-portable) fix to the problem, but it looks
like that'll be unnecessary now!
On Fri, Jun 19, 2009 at 11:18 PM, Sam Steingold <sd...@gn...> wrote:
>
> You are aware of the abstractions provided in the file sql.lisp, aren't you?
Yes, I'm aware of the abstraction provided in sql.lisp.
Unfortunately, there doesn't seem to be a way to execute prepared
queries (which are considerably safer) in there. Perhaps if I get
something good working, I can contribute it to sql.lisp?
Also, while we're at it:
(def-call-out PQexecParams (:return-type PGresult)
(:arguments (conn PGconn) (command c-string) (nParams int)
(paramTypes (c-ptr (c-array-max Oid #.MAX-PARAM)) :out :alloca)
(paramValues (c-ptr (c-array-max c-string #.MAX-PARAM))
:out :alloca)
(paramLengths (c-ptr (c-array-max int #.MAX-PARAM)) :out :alloca)
(paramFormats (c-ptr (c-array-max int #.MAX-PARAM)) :out :alloca)
(resultFormat int)))
is the current signature for PQexecParams. The arguments paramTypes,
ParamValues, paramLengths and paramFormats are all input parameters.
Does the call work when specifying them as out?
Anyway, thanks again for the quick fix. I'll try out the CVS tomorrow
when I wake up and let you know how it goes.
|