Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)
Date
Msg-id 28886.1037773665@sss.pgh.pa.us
Whole thread Raw
In response to Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> Fair enough -- although there's a major difference between the
> meta-data stored about tables (which are permanent database objects
> and are typically complex), and prepared statements (which (at
> present) are only stored for the duration of the current connection,
> and are relatively simple: many statements will not have more than a
> couple params). Arguably, the difference is enough to make it
> nonessential that we provide client programmers with that information.

I forgot to point out this: if the client programmer could conveniently
provide that info, we'd not be having this discussion, because he could
just as well include the datatypes in the PREPARE command to meet our
existing syntax.  The fact that we are getting complaints about the
syntax is sufficient evidence that it's not always reasonable to expect
client-side code to know the datatypes.  (I think this comes mainly from
the fact that client-side code is not monolithic but tends to consist
of multiple layers.  Some of those layers may be expected to know
a-priori what datatypes a query involves, but others will not know.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Geometry test on NetBSD (was Re: RC1?)
Next
From: Patrick Welche
Date:
Subject: Re: RC1?