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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] atttypmod now 32 bits, interface change
Дата
Msg-id 1872.901118603@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] atttypmod now 32 bits, interface change  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] atttypmod now 32 bits, interface change  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [INTERFACES] Re: [HACKERS] atttypmod now 32 bits, interface change
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] cidr