Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15549 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18695 invoked by uid 1010); 23 Mar 2005 03:24:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18680 invoked from network); 23 Mar 2005 03:24:58 -0000 Received: from unknown (HELO gmail.com) (127.0.0.1) by localhost with SMTP; 23 Mar 2005 03:24:58 -0000 X-Host-Fingerprint: 64.233.184.199 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.199:11324] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id BA/70-04146-981E0424 for ; Tue, 22 Mar 2005 22:24:58 -0500 Received: by wproxy.gmail.com with SMTP id 37so61832wra for ; Tue, 22 Mar 2005 19:24:52 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=H6KQVugZAtBDUNMsvUQmbTvL8JBszLMrhO1nU4MnvaNtKPzQozbzhh9Vj5Wb2LPpzXXZEJ2MvNcJsqGk35I9YP/t9CXIQA2dxZWoWBNcUKzo0Iddf2dDThnDTY2mz+CSCA8li/MzcRFtmIBpBqeRVqpoI1R2tM4FmFjpZipvPLo= Received: by 10.54.89.5 with SMTP id m5mr200837wrb; Tue, 22 Mar 2005 19:24:52 -0800 (PST) Received: by 10.54.44.57 with HTTP; Tue, 22 Mar 2005 19:24:51 -0800 (PST) Message-ID: <4e89b42605032219241edf4a16@mail.gmail.com> Date: Tue, 22 Mar 2005 22:24:51 -0500 Reply-To: Wez Furlong To: Christopher Kings-Lynne Cc: Dan Scott , php-dev In-Reply-To: <4240BFD5.9090605@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <423F84AD.9070809@familyhealth.com.au> <027201c52ed8$8b369170$1200000a@intra.emini.dk> <42402D82.8000305@familyhealth.com.au> <4240BFD5.9090605@familyhealth.com.au> Subject: Re: [PHP-DEV] pdo_pgsql From: kingwez@gmail.com (Wez Furlong) 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 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 > > 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 > >