Re: pdo_pgsql
| From: | Wez Furlong | Date: | Wed, 23 Mar 2005 03:24:51 +0000 |
| Subject: | Re: pdo_pgsql | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15549@lists.php.net to get a copy of this message | ||
Depends on how you define "correctly" ;-)
Chances are that it will raise an error.
I'm not sure if this should really be considered a problem; that's a
really obtuse SQL statement. As a non-pgsqler, I have a hard time
figuring out where the variables are.
I welcome native postgres prepare/bind/execute support, and don't mind
adjusting the pdo_sql_parser.re code to cater for rewriting ? or
:named style substitutions into postgres style; it already includes
some logic for rewriting ? to :named and vice-versa, so the
modifications should be reasonably simple.
--Wez.
On Wed, 23 Mar 2005 09:01:09 +0800, Christopher Kings-Lynne
<chriskl@familyhealth.com.au> wrote:
> Hi Dan,
>
> What I mean is, will PDO happily parse this PostgreSQL statement and
> substitute the two variables correctly?
>
> SELECT '?', ? from "?" where ? = $_$?$_$;
>
> Chris
>
> Dan Scott wrote:
> > Hi Chris:
> >
> > As documented in
> > http://www.php.net/manual/en/function.pdo-prepare.php:
> >
> > "The SQL statement can contain zero or more named (:name) or question
> > mark (?) parameter markers for which real values will be substituted
> > when the statement is executed."
> >
> > Anything beyond this would be an extension to the PDO spec that would
> > have to be implemented within the actual pdo_pgsql driver.
> >
> > Dan
> >
> > On Tue, 22 Mar 2005 22:36:50 +0800, Christopher Kings-Lynne
> > <chriskl@familyhealth.com.au> wrote:
> >
> >>>Most of the PDO interface is supported in pgsql driver. However we do not
> >>>use native pgsql prepare/execute but PDO's built in emulation for it. If you
> >>>could look into how could native api be used in pdo_pgsql that would be
> >>>great.
> >>>
> >>
> >>Ooer. How on earth do you simulate the parameter markers? Are they
> >>required to be '?'? Do you deal with dollar quoting, etc.?
> >>
> >>Chris
> >>
> >>--
> >>PHP Internals - PHP Runtime Development Mailing List
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>