Array Parameters on protocol 3.0

Started by Carlos Guzman Alvarezover 22 years ago4 messages
#1Carlos Guzman Alvarez
carlosga@telefonica.net

Hello:

I'm trying to give support to array parameters for sql commands in my
.net data provider for postgres 7.4, i'm sending the same data as i need
for read array field values but i get always the error :

insufficient data left in message

I'm sending this for array parameters (in binary format):

* the number of dimensions.

* flags (always 0).

* base type of the array elements (oid).

* lengths and lower bounds.

* array values.

* value size.

* value.

Is this correct ??

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Carlos Guzman Alvarez (#1)
Re: Array Parameters on protocol 3.0

Carlos Guzman Alvarez <carlosga@telefonica.net> writes:

I'm sending this for array parameters (in binary format):
* the number of dimensions.
* flags (always 0).
* base type of the array elements (oid).
* lengths and lower bounds.
* array values.
* value size.
* value.

Is this correct ??

Looks right to me. Either you have some small typo in your code, or the
backend does ... let me know which ...

Note that "insufficient data left in message" could arise from
misformatting of an individual array element with respect to its
individual value size, not only from a mistake at the whole-array level.

regards, tom lane

#3Carlos Guzman Alvarez
carlosga_N_O_S_P_A_M@N_O_S_P_A_M_telefonica.net
In reply to: Tom Lane (#2)
Re: Array Parameters on protocol 3.0

Hello:

Looks right to me. Either you have some small typo in your code, or the
backend does ... let me know which ...

Note that "insufficient data left in message" could arise from
misformatting of an individual array element with respect to its
individual value size, not only from a mistake at the whole-array level.

Seems that i have it working now :), i was not sending the length of the
whole array information :)

Thanks very much.

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain

#4Carlos Guzman Alvarez
carlosga@telefonica.net
In reply to: Tom Lane (#2)
Re: Array Parameters on protocol 3.0

Hello:

Looks right to me. Either you have some small typo in your code, or the
backend does ... let me know which ...

Note that "insufficient data left in message" could arise from
misformatting of an individual array element with respect to its
individual value size, not only from a mistake at the whole-array level.

I think I have it fixed yet :) i was not sending the length of the whole
array parameter :)

Thanks very much.

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain