| From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
|---|---|
| To: | "Greg Stark" <gsstark(at)mit(dot)edu> |
| Cc: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: libpq and prepared statements progress for 8.0 |
| Date: | 2004-09-15 12:48:58 |
| Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB3412A74AF@Herge.rcsinc.local |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> A bit of context here. The perl DBD::Pg developers are trying to
figure
> out
> how to implement prepared queries sanely. As it stands now they're
> basically
> writing off both binary prepared queries and SQL based prepared
queries as
> basically useless. It would be a shame to have a brand new binary
protocol
> but
> find it ignored by driver writers.
>
> The problem is that you want to be able to do
>
> $sth = $dbh->prepare("SELECT col_a FROM tab WHERE col_b = ?");
> $sth->execute(1);
> ...
>
> And not have to jump through hoops binding parameters to types and so
on.
>
suggestion: default to text type ('character varying') and overload your
prepare method to allow a vector of types for special cases. It follows
that if you don't know what type you are dealing with than it gets dealt
with as a string.
Question: what is the relevance of the binary protocol, are you trying
to send/fetch binary data via the command interface?
Merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2004-09-15 13:24:54 | Re: SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0 |
| Previous Message | Neil Conway | 2004-09-15 11:49:15 | assertion failure w/ valgrind |