Tom Lane wrote:
Andrew Chernow <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to