Re: [HACKERS] atttypmod now 32 bits, interface change - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] atttypmod now 32 bits, interface change
Date
Msg-id 1872.901118603@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] atttypmod now 32 bits, interface change  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] atttypmod now 32 bits, interface change  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
t-ishii@sra.co.jp writes:
>> I noticed that 6.4 client did not talk to 6.3.2 server.
>> Connection to database 'test' failed.
>> Unsupported frontend protocol.
>>
>> I thought that we have kept the "backward compatibility" since we
>> introduced "protocol version" in libpq?

Backwards compatibility yes: a 6.4 server should be able to talk to
an old client.  You're asking about cross-version compatibility in the
other direction, which is something we don't have.  The connection
protocol is designed to let the server accommodate to the client, not
vice versa --- the client tells the server its version, but not vice
versa.  I suppose the client might check for that particular error
message after a connect failure and then try again with a lower version
number ... but that's pretty messy.

On a practical level, the new libpq is not capable of talking to an old
server anyway --- some of the cleanups I made are critically dependent
on new protocol features, such as the 'Z' (ReadyForQuery) message.

Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Might be my atttypmod changes.  I did not make those version-sensitive.
> I will do that now.

Yes, if we want to have backward compatibility as I just defined it,
then the backend will have to send atttypmod as either 2 or 4 bytes
depending on ProtocolVersion.  Shouldn't be too hard.  But I'm concerned
that you and I both missed that initially.  We had better actually test
that the current backend sources will work with a 6.3.2-release frontend.

            regards, tom lane

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [INTERFACES] Re: [HACKERS] atttypmod now 32 bits, interface change
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] cidr