PQ versions request message - Mailing list pgsql-hackers

From James William Pye
Subject PQ versions request message
Date
Msg-id 1126139485.2425.98.camel@localhost
Whole thread Raw
Responses Re: PQ versions request message
Re: PQ versions request message
List pgsql-hackers
I have been writing a PQ client and I have come to think that a
"supported PQ versions request startup packet" would be useful to client
authors. That is, sending a StartupPacket(Version(0, 0))(or whatever)
would return a message containing a list of supported PQ versions, and
maybe the server version as well.

Having the said feature would allow client authors to select the
connection code based on the versions returned, rather than using a
trial and error process. It also gives the client the ability to quickly
error out and notify the user that it cannot connect to the server if
the client doesn't support any of the server versions.

I find the trial and error process unseemly as it could require code to
be loaded that simply does not need to be loaded--of course, making
assumptions about the client design(this would likely be the case for my
client). In addition, the trial and error process could be time
consuming depending on how the connection to the server is established,
thus further decreasing the appeal of the trial and error process(hrm,
this may not be a useful criticism of t&e if pg keeps the pipe open
until the client sends a suitable startup packet?). Although, I do see
that the trial and error process would only need to happen once(per
process, I figure) if the client author cached the code selection
information about a given server.

Thoughts? Has this been proposed/shot down before?
-- 
Regards, James William Pye


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_config/share_dir
Next
From: Greg Stark
Date:
Subject: Re: Attention PL authors: want to be listed in template table?