Thread: Array Parameters on protocol 3.0
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
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
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
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