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: [GENERAL] Error: insufficient data in the message
> > To: ranier_gyn@hotmail.com
> > From: adrian.klaver@aklaver.com
> > 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 *)
> > > ¶ms[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@aklaver.com
--
Adrian Klaver
adrian.klaver@aklaver.com