Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 27E0A475B8E for ; Wed, 20 Nov 2002 01:27:47 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 692C6475A71 for ; Wed, 20 Nov 2002 01:27:46 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id gAK6RkhR028887; Wed, 20 Nov 2002 01:27:46 -0500 (EST) To: Neil Conway Cc: David Wheeler , pgsql-hackers@postgreSQL.org Subject: Re: PREPARE and parameter types (Re: [INTERFACES] DBD::PostgreSQL) In-reply-to: <87u1icixbb.fsf@mailbox.samurai.com> References: <118.1037638710@sss.pgh.pa.us> <8765uskg1a.fsf@mailbox.samurai.com> <28501.1037769895@sss.pgh.pa.us> <87u1icixbb.fsf@mailbox.samurai.com> Comments: In-reply-to Neil Conway message dated "20 Nov 2002 01:12:40 -0500" Date: Wed, 20 Nov 2002 01:27:45 -0500 Message-ID: <28886.1037773665@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/813 X-Sequence-Number: 32029 Neil Conway 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