X-Original-To: pgsql-hackers@postgresql.org Received: from grunt25.ihug.com.au (grunt25.ihug.com.au [203.109.249.145]) by postgresql.org (Postfix) with ESMTP id 773EA4762F6; Mon, 10 Mar 2003 21:47:04 -0500 (EST) Received: from p210-tnt1.adl.ihug.com.au (postgresql.org) [203.173.248.210] by grunt25.ihug.com.au with esmtp (Exim 3.35 #1 (Debian)) id 18sZnG-0002ly-00; Tue, 11 Mar 2003 13:47:07 +1100 Message-ID: <3E6D4E28.7090601@postgresql.org> Date: Tue, 11 Mar 2003 13:17:04 +1030 From: Justin Clift User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Dave Page , pgsql-hackers@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: Roadmap for FE/BE protocol redesign References: <03AF4E498C591348A42FC93DEA9661B8259D66@mail.vale-housing.co.uk> <28363.1047343721@sss.pgh.pa.us> In-Reply-To: <28363.1047343721@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/408 X-Sequence-Number: 36654 Tom Lane wrote: > "Dave Page" writes: > >>What about the addition of pg_attribute.attrelid & >>pg_attribute.attname/attnum in RowDesription messages to identify the >>underlying attribute (where appropriate)? > > Well, we can talk about it, but I still think that any frontend that > relies on such information is broken by design. (And if that means the > JDBC spec is broken, then the JDBC spec is broken.) > > Just to start with, if I do "SELECT * FROM view", am I going to see the > info associated with the view column, or with the hypothetical > underlying table column? (Actually, didn't I already make a list of a > bunch of ways in which this concept is underspecified? AFAIR, you > didn't suggest answers to any of those questions ... but we need answers > to all of them if we are going to implement the feature.) The problem Dave is suggesting this as a first attempt at a solution for is that with ODBC, a frontend (i.e. OpenOffice) asks the ODBC driver which columns are NULLable, etc. And the ODBC driver is getting the info wrong, then passing back the incorrect info. So, when a person goes to insert a row into a table with a SERIAL/SEQUENCE based column, OpenOffice has been told the column isn't NULLable and forces the user to enter a value. Voila, it doesn't work with sequences. :( It's likely possible to add to the ODBC driver some way of getting the info right, but Dave is also looking for a way of making this easier into the future for similar problems. i.e. Let the database explicitly have info about what each column can do. That's my understanding of it anyway. :-) Regards and best wishes, Justin Clift > regards, tom lane -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi