Re: :PgSQL: More Queestions

From: Rudy Lippan <rlippan(at)remotelinux(dot)com>
To: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
Cc: Rudy Lippan <rlippan(at)remotelinux(dot)com>, Adam Witney <awitney(at)sghms(dot)ac(dot)uk>, David Wheeler <david(at)wheeler(dot)net>, <dbi-dev(at)perl(dot)org>, pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: :PgSQL: More Queestions
Date: 2002-11-21 20:54:56
Message-ID: Pine.LNX.4.44.0211211541560.21197-100000@elfride.ineffable.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Thu, 21 Nov 2002, Tim Bunce wrote:

>
> Or ignore colons that have a digit as the previous character
> as that would never be a placeholder.
>

Since DBD::Pg emulates place holders, it is possible to have them after a
digit.

I thought that using the [ as a literal marker might break less existing
code, for example $d->prepare->("insert into foo (int_date)
VALUES(200301:1"); Or any such other silly uses. And besides the array
data type will probably be used less than other types.

The best solution might be to treat [] as a literal wrt placeholders, but
allow [:1 for the [:1] case, which is the only case that would work with
the existing code. Currently, For [:1:2] preparse would see 2 place
holders and for [:1::2] preparse would see a place holder and a cast.

Thougths?

-r

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jeff Urlwin 2002-11-21 23:05:42 Re: :PgSQL: More Queestions
Previous Message Tim Bunce 2002-11-21 19:52:19 Re: :PgSQL: More Queestions