Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: David Wheeler <david(at)wheeler(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)
Date: 2002-11-20 06:27:45
Message-ID: 28886.1037773665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Neil Conway <neilc(at)samurai(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2002-11-20 08:53:11 Re: Bug with sequence
Previous Message Tom Lane 2002-11-20 06:15:12 Re: Geometry test on NetBSD (was Re: [HACKERS] RC1?)

Browse pgsql-interfaces by date

  From Date Subject
Next Message David Wheeler 2002-11-20 07:03:23 Re: :PgSQL: More Queestions
Previous Message Neil Conway 2002-11-20 06:12:40 Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL)