Re: PQ versions request message - Mailing list pgsql-hackers

From James William Pye
Subject Re: PQ versions request message
Date
Msg-id 1126146525.2425.125.camel@localhost
Whole thread Raw
In response to Re: PQ versions request message  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: PQ versions request message
List pgsql-hackers
On Thu, 2005-09-08 at 03:48 +0200, Peter Eisentraut wrote:
> This doesn't make sense to me, because a server does not have any 
> version requirements on the client (aside from the protocol versions, 
> which are negotiated automatically).

The use case primarily applies to custom clients(non-libpq, atm) that
support multiple PQ versions that may be implemented in separate
modules/libraries. (Avoid loading client-2.0 code for a 3.0 connection,
and/or future versions.)

libpq "automatically negotiates" the version using trial and error,
effectively(assume 3.0 by sending 'S', if 'E', fallback to 2.0, and
reestablish the connection, apparently).

> > and maybe the server version as well. 
> 
> That is already available automatically.

Yes, but, AFAIK, only after the protocol has been negotiated and
authentication is complete. Really, I'm not sure if such a feature
should include the server version as selecting feature implementations
based on it is probably a bad idea(TM).
-- 
Regards, James William Pye


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb profiles
Next
From: Andrew Dunstan
Date:
Subject: Re: initdb profiles