Search Postgresql Archives

Re: Error: insufficient data in the message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/18/2016 08:49 AM, Ranier VF wrote:

Ccing list for real this time, for reasons stated below.

Hi,

 > Per previous posts, the error is not coming from Postgres, but from your
 > client software. Some searching indicates pgsql_pexec is part of the
 > Asterisk PBX software. Is that the case?
Not. The client code is own.
Yes the error is coming from client code, not from Postgres.

Libpq.dll (Postgresql 9.5.0), 32 bits, expect BIGINT param.
Own client code can not format correct bits.

Would be possible, example code in C, to format BIGINT
param with msvc 32 bits compiler?


I am not a C programmer and I do almost 0 development on Windows, so I have no answers for the above. Including the list as I am pretty sure there are folks on it who have the answer.


Best regards,

Ranier Vilela

 > Subject: Re:  Error: insufficient data in the message
 > To: ranier_gyn@xxxxxxxxxxx
 > From: adrian.klaver@xxxxxxxxxxx
 > Date: Fri, 18 Mar 2016 07:50:14 -0700
 >
 > On 03/18/2016 07:29 AM, Ranier VF wrote:
 >
 > Ccing list
 > > Hi, Thank your for response.
 > >
 > > After hard time, find this bug.
 > > I see that the problem is.
 > >
 > > length datatypes, in param[2]
 > > field is BIGINT (postgresql)
 > > param (num_long var) is unsigned long long (32bits)
 > >
 > > params[i].data.num_ulong = htonl(params[i].data.num_ulong);
 > > prep->bindValues[i] = (const uchar *)
 > > &params[i].data.num_ulong;
 > > prep->bindLengths[i] = sizeof(ulong);
 > > prep->bindFormats[i] = 1;
 > >
 > > This fail miserably with windows 32bits (xp, Win7).
 > >
 > > If change to:
 > > prep->bindLengths[i] = 8;
 > >
 > > Postgresql error goes, but the wrong value is inserted.
 >
 > Per previous posts, the error is not coming from Postgres, but from your
 > client software. Some searching indicates pgsql_pexec is part of the
 > Asterisk PBX software. Is that the case?
 >
 > >
 > > For while, BIGINT is avoided for us.
 > >
 > > Best regards,
 > >
 > > Ranier Vilela
 >
 >
 > --
 > Adrian Klaver
 > adrian.klaver@xxxxxxxxxxx


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux