X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EC28ED8EA6 for ; Wed, 14 Sep 2005 20:52:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80097-07 for ; Wed, 14 Sep 2005 23:52:54 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id A4F0DD76F7 for ; Wed, 14 Sep 2005 20:52:54 -0300 (ADT) Received: (qmail 16082 invoked from network); 14 Sep 2005 23:52:57 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 14 Sep 2005 23:52:57 -0000 From: "Greg Sabino Mullane" To: pgsql-interfaces@postgresql.org Cc: Sean Davis Cc: Sean Davis Subject: Re: Beta of DBD::Pg 1.44 available X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 Date: Wed, 14 Sep 2005 23:52:57 -0000 X-Mailer: JoyMail 1.48 Message-ID: <35dd10e25f1ee6e3f027c9c73d0b0b8d@biglumber.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.092 required=5 tests=[AWL=0.092] X-Spam-Level: X-Archive-Number: 200509/22 X-Sequence-Number: 5745 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> - Explicitly prevent any parsing of statements for placeholders >> unless they begin with "SELECT", "INSERT", "UPDATE", or "DELETE" >> Suggested by (and fixes) CPAN bug #13608 [GSM] > Thanks for doing all of this. I will give it a whirl. Just a quick > question on the point directly above: does this imply that explain and > explain analyze are excluded from placeholder parsing? I don't personally > use them programmatically, but I think that particularly for count(*) types > of queries or receiving estimates of the number of returned tuples without > executing the query, people could potentially use explain select.... Pardon > my laziness for not looking at the code for my own answers. Excellent question. There obviously needs to be a way around this, as your explain scenario points out. I have another parameter "pg_client_prepare" waiting in the wings for just such an occasion. The question becomes, do we make parsing the default, and break lots of future apps that start using the "dollar-quoting" feature, or do we make the default to only parse DML statements, possibly breaking lots of older apps? I'm leaning heavily towards the latter, not least of which is because the backend's PREPARE only accepts DML as well, but welcome any discussion on the subject. A third (and probably best) option is to make the parser inside of DBD::Pg recognize dollar-quoting. I'll play around with that one some more. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200509141424 https://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFDKLeWvJuQZxSWSsgRAriGAJsG5AML1mv8qYGvaFYqQ1VYohaicgCgsHkN gqzxS8R7GNH6NsF1kyBGfr0= =GWQc -----END PGP SIGNATURE-----