pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sander Steffann <sander@steffann.nl>
To: pgsql-hackers@postgreSQL.org
To: pgsql-interfaces@postgreSQL.org
Subject: Re: First draft of new FE/BE protocol spec posted for comments
Date: Wed, 23 Apr 2003 23:17:05 +0200
Message-ID: <000801c309dd$b1789d00$64c8a8c0@10ww.steffann.nl> (raw)
References: <10770.1050448110@sss.pgh.pa.us>
	<3EA6D372.3000406@xythos.com>

Hi,

> My final question is more of an implementation question than comments on
> the protocol itself.  Since the jdbc driver needs to be backwardly
> compatible with 7.3 and earlier servers that will speak the 2.0
> protocol, what is the recomended way to write the client so that it can
> 'detect' which protocol to use.  The only thing I can think of is to
> start by sending a version 2 protocol message (which will work across
> all the database versions that jdbc will be supporting) then if it finds
> it it talking to a 7.4 server, close the connection and reconnect using
> the version 3 protocol.  This will double connection time when
> connecting to a 7.4 server but is the only way I can think of to do
> this.  Is there a better way that I am missing?

Since I guess there will be a lot more 7.4+ servers than older servers I
think you should at least try protocol v3 first, and if that fails try v2.
Try to keep it as fast as possible for the most used version.

Could be that that this isn't possible though. I don't know the protocol
well enough to be sure. Maybe its an idea to introduce a new messagetype at
protocol level with which the client can ask the server which protocol
versions it supports. That would make protocol changes a lot easier in the
future. And if the server doesn't understand that new messagetype you know
you are talking to a v2-only server :)

Bye
Sander




view thread (12+ messages)  latest in thread

Message-ID: <000801c309dd$b1789d00$64c8a8c0@10ww.steffann.nl>
Permalink:  ../000801c309dd$b1789d00$64c8a8c0@10ww.steffann.nl/
Also on:    postgresql.org/message-id/000801c309dd$b1789d00$64c8a8c0@10ww.steffann.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: sander@steffann.nl, pgsql-hackers@postgreSQL.org
  Subject: Re: First draft of new FE/BE protocol spec posted for comments
  In-Reply-To: <000801c309dd$b1789d00$64c8a8c0@10ww.steffann.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox