Re: :PgSQL: More Queestions - Mailing list pgsql-interfaces

From Rudy Lippan
Subject Re: :PgSQL: More Queestions
Date
Msg-id Pine.LNX.4.44.0211211541560.21197-100000@elfride.ineffable.net
Whole thread Raw
In response to Re: :PgSQL: More Queestions  (Tim Bunce <Tim.Bunce@pobox.com>)
List 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




pgsql-interfaces by date:

Previous
From: Tim Bunce
Date:
Subject: Re: :PgSQL: More Queestions
Next
From: "Jeff Urlwin"
Date:
Subject: Re: :PgSQL: More Queestions