Re: [HACKERS] atttypmod now 32 bits, interface change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: pgsql-interfaces(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] atttypmod now 32 bits, interface change
Date: 1998-07-22 14:43:23
Message-ID: 1872.901118603@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

t-ishii(at)sra(dot)co(dot)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(at)candle(dot)pha(dot)pa(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-07-22 14:46:26 Re: [HACKERS] cidr
Previous Message James Olin Oden 1998-07-22 14:39:58 Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]

Browse pgsql-interfaces by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-07-22 14:49:11 Re: [INTERFACES] Re: [HACKERS] atttypmod now 32 bits, interface change
Previous Message Matthew Hagerty 1998-07-22 14:33:10 Static link with libpq