Re: Beta of DBD::Pg 1.44 available

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Subject: Re: Beta of DBD::Pg 1.44 available
Date: 2005-09-14 23:52:57
Message-ID: 35dd10e25f1ee6e3f027c9c73d0b0b8d@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


-----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(at)turnstep(dot)com
PGP Key: 0x14964AC8 200509141424
https://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFDKLeWvJuQZxSWSsgRAriGAJsG5AML1mv8qYGvaFYqQ1VYohaicgCgsHkN
gqzxS8R7GNH6NsF1kyBGfr0=
=GWQc
-----END PGP SIGNATURE-----

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2005-09-15 02:49:53 Re: Beta of DBD::Pg 1.44 available
Previous Message Mark Richardson 2005-09-14 23:20:13 libpq, ecpg and the bytea data type