From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Ranier VF <ranier_gyn(at)hotmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Error: insufficient data in the message |
Date: | 2016-03-19 14:09:47 |
Message-ID: | 56ED5DAB.8020503@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)hotmail(dot)com
> > From: adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Yi, Yi | 2016-03-19 14:41:58 | Confused by the behavior of pg_basebackup with replication slot |
Previous Message | Adrian Klaver | 2016-03-18 21:46:46 | Re: [GENERAL] grant select on pg_stat_activity |