Re: binary array and record recv

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: binary array and record recv
Дата
Msg-id 4767F0A5.104@esilo.com
обсуждение исходный текст
Ответ на Re: binary array and record recv  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: binary array and record recv  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Andrew Chernow <ac@esilo.com> writes:
>> Both array and record binary recv functions require that the recv'd Oid 
>> match the Oid of what the backend has deduced.  We don't think this 
>> behavior gets you very much.
> 
> Other than the ability to detect errors before the code goes off into
> the weeds, you mean?
> 
>             regards, tom lane
> 
> 

When dealing with binary, the Oid the client sends may match what the 
server thinks but the data is wrong (client sent binary formatted data 
of the wrong type).  Thus, the only real check we saw was on the data 
length (which is rolling the dice).

Plus for non-array and non-composite types, specifying Oid is optional.  So why is it not optional for
arrays/composites?

How is the client supposed to send back composite types without having a 
meaningful way to get the Oids from the server?  Either you have to be 
flexible and trust what the client sends or you have to make it possbile 
for the client to get the proper information.

Third option is to not allow client to send binary composite/array types 
at all.

andrew & merlin
eSilo


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: binary array and record recv
Следующее
От: Tom Lane
Дата:
Сообщение: Re: binary array and record recv