Re: binary array and record recv

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: binary array and record recv
Date: 2007-12-18 16:09:09
Message-ID: 4767F0A5.104@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Chernow <ac(at)esilo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-12-18 16:30:22 Re: binary array and record recv
Previous Message Tom Lane 2007-12-18 15:49:41 Re: binary array and record recv