Re: Roadmap for FE/BE protocol redesign

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>, "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Roadmap for FE/BE protocol redesign
Date: 2003-03-12 15:49:54
Message-ID: 27130.1047484194@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> No, but with them we can avoid cluttering the wire protocol with fields
> for all this, and the JDBC required data. With 2 numeric columns
> (attrelid, attnum), any application/interface can query the system
> catalogs easily for whatever extra info they like.

This is my feeling also. We shouldn't try to guess in the protocol
exactly what set of information will be wanted by a frontend; we should
just provide the catalog keys needed to look up whatever is wanted.

I like attrelid/attnum because (a) it's compact --- not much added
overhead for apps that don't care; and (b) it's a primary key, which
names are not. The relid/attnum identity of a column will remain the
same as long as it exists. A name-based API breaks the moment some
other user renames things; similar objections could be raised against
attlognum, if we had it.

The point about apps breaking if the system catalog layout changes is a
fair one, but that situation would be no worse than it's ever been; ODBC
and JDBC have coped well enough so far. In any case the best solution
would be to offer functions that hide the details of where to find any
given bit of info. We've got a few like that already (format_type() for
example) and I have no problem with adding more.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-12 16:19:40 Re: Roadmap for FE/BE protocol redesign
Previous Message Peter Eisentraut 2003-03-12 15:43:31 Re: Numbering of the next release: 8.0 vs 7.4

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-03-12 16:19:40 Re: Roadmap for FE/BE protocol redesign
Previous Message Peter Eisentraut 2003-03-12 15:44:24 Re: Automatic detection of PostgreSQL version