Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Last round (I think) of FE/BE protocol changes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Last round (I think) of FE/BE protocol changes
Date: 2003-05-13 22:58:18
Message-ID: 19127.1052866698@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I think the "future versions" in this are going to be making this choice a
> datatype-specific session state.  How can we make this transition
> smoother?  Maybe 0 can be default, 1 text, 2 binary?

Why would a variable default be a good idea?  The client *always* wants
to know what format the data is being returned in; I can't imagine
wanting a default that might be unknown to (any layer of) client
software.

One of the things that I think I have learned from this redesign is
that hidden state variables that affect the low-level protocol are
a bad idea.  If we were to provide a changeable default format, I'd
want it to be reported by ParameterStatus messages.  But I don't really
see the argument for providing it.  You'd just have to clutter the
client-side stack with mechanisms for finding out what the default is.
That's about the same amount of grunge in the API as labeling data with
the format code in the first place ... but it's a lot easier to shoot
yourself in the foot by forgetting to handle it.

			regards, tom lane


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-05-13 23:04:05
Subject: Re: GUC and postgresql.conf docs
Previous:From: Peter EisentrautDate: 2003-05-13 22:48:02
Subject: Re: [INTERFACES] Last round (I think) of FE/BE protocol changes

pgsql-interfaces by date

Next:From: St├ęphane PinelDate: 2003-05-14 16:58:12
Subject: PQhost
Previous:From: Peter EisentrautDate: 2003-05-13 22:48:02
Subject: Re: [INTERFACES] Last round (I think) of FE/BE protocol changes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group