From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [Fwd: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h] |
Date: | 2005-11-27 16:47:39 |
Message-ID: | 2171.1133110059@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Is Wez of the PHP project correct here in that you can't find parameter
> types of statements via libpq?
Per the description of PQprepare:
: At present, there is no way to determine the actual data type inferred
: for any parameters whose types are not specified in paramTypes[]. This
: is a libpq omission that will probably be rectified in a future release.
We need a function that exposes the protocol's Describe Statement
functionality ... or possibly better, extend PQprepare to include it.
(If PQprepare just does it automatically, then you don't need an extra
network round trip to get the info.)
I don't think this is as big a problem as he makes it out to be, though.
You should only be trying to use binary format for parameters that you
know darn well the type of, and for those you can make sure that you
specify the type to PQprepare instead of leaving it to be inferred.
Depending on the type-inference facility for arbitrary queries is
dangerous anyway.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-11-27 18:27:54 | Re: Strange interval arithmetic |
Previous Message | Tom Lane | 2005-11-27 16:24:26 | Re: PQfnumber() Fix Proposal |