From: Neil Conway <neilc@samurai.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Wheeler <david@wheeler.net>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)
Date: 19 Nov 2002 23:42:57 -0500
Message-ID: <8765uskg1a.fsf@mailbox.samurai.com> (raw)
In-Reply-To: <118.1037638710@sss.pgh.pa.us>
References: <A3F94BB8-FB12-11D6-93B3-0003931A964A@wheeler.net>
<118.1037638710@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Thinking about this, it occurs to me that there's no good reason why
> we couldn't allow parameter symbols ($n) to be considered type UNKNOWN
> initially.
Good idea.
> This form of PREPARE would presumably need some way of reporting back
> the types it had determined for the symbols; anyone have a feeling for
> the appropriate API for that?
Why would this be needed? Couldn't we rely on the client programmer to
know that '$n is of type foo', and then pass the appropriately-typed
data to EXECUTE?
If we *do* need an API for this, ISTM that by adding protocol-level
support for PREPARE/EXECUTE, this shouldn't be too difficult to do
(and analogous to the way we pass back type information for SELECT
results). It would also allow us to side-step the parser for EXECUTE
parameters, which was something that a few people had requested
earlier.
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: neilc@samurai.com, tgl@sss.pgh.pa.us, david@wheeler.net, pgsql-hackers@postgreSQL.org
Subject: Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)
In-Reply-To: <8765uskg1a.fsf@mailbox.samurai.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox