pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Clift <justin@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dave Page <dpage@vale-housing.co.uk>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Roadmap for FE/BE protocol redesign
Date: Tue, 11 Mar 2003 13:17:04 +1030
Message-ID: <3E6D4E28.7090601@postgresql.org> (raw)
In-Reply-To: <28363.1047343721@sss.pgh.pa.us>
References: <03AF4E498C591348A42FC93DEA9661B8259D66@mail.vale-housing.co.uk>
	<28363.1047343721@sss.pgh.pa.us>

Tom Lane wrote:
> "Dave Page" <dpage@vale-housing.co.uk> 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




view thread (133+ messages)  latest in thread

Message-ID: <3E6D4E28.7090601@postgresql.org>
Permalink:  ../3E6D4E28.7090601@postgresql.org/
Also on:    postgresql.org/message-id/3E6D4E28.7090601@postgresql.org

 · 

reply

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: justin@postgresql.org, tgl@sss.pgh.pa.us, dpage@vale-housing.co.uk, pgsql-hackers@postgresql.org
  Subject: Re: Roadmap for FE/BE protocol redesign
  In-Reply-To: <3E6D4E28.7090601@postgresql.org>

* 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