Re: Roadmap for FE/BE protocol redesign - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Roadmap for FE/BE protocol redesign
Date
Msg-id 27130.1047484194@sss.pgh.pa.us
Whole thread Raw
In response to Re: Roadmap for FE/BE protocol redesign  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
"Dave Page" <dpage@vale-housing.co.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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Numbering of the next release: 8.0 vs 7.4
Next
From: Tom Lane
Date:
Subject: Re: Roadmap for FE/BE protocol redesign