libpq and prepared statements progress for 8.0 - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject libpq and prepared statements progress for 8.0
Date
Msg-id 569b608c1c9fae70053efc0c2904a8f0@biglumber.com
Whole thread Raw
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anyone working on the libpq interface to prepared statements?
We could really use that for DBD::Pg. Alternatively, if someone
knows a trick to prepare an INSERT statement without knowing
the data types, that would be neat too. For example:
CREATE TABLE foobar(a INTEGER);
These don't work:
PREPARE st(text) AS INSERT INTO foobar(a) VALUES ($1);
PREPARE st(unknown) AS INSERT INTO foobar(a) VALUES ($1);
PREPARE st(unknown) AS INSERT INTO foobar(a) VALUES ($1::unknown);
(Yes, I know st(int) works, but DBD::Pg is not going to become a
SQL parser, that's the backend's job, so we need a way to force
unknown, or a way to return the data types back to us when we
prepare a statement. The latter is on the 8.0 todo list, but have
not seen any progress onit)
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200409132114
-----BEGIN PGP SIGNATURE-----
iD8DBQFBRkYqvJuQZxSWSsgRAnYoAKDicZ62t5N2kLNx7zDJRd3t9J7YTgCg7uVE
xugi93g3Av2Smm8TkMz8MCk=
=IwEf
-----END PGP SIGNATURE-----




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cleaning up recovery from subtransaction start failure
Next
From: Alvaro Herrera
Date:
Subject: Re: Cleaning up recovery from subtransaction start failure