Re: Error: insufficient data in the message

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ranier VF <ranier_gyn(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error: insufficient data in the message
Date: 2016-03-17 23:56:20
Message-ID: 56EB4424.80103@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/16/2016 01:49 PM, Ranier VF wrote:
> Hi, I around with error with PostgreSQL 9.5.0
>
> Prepared Statment:
> INSERT INTO tbCerts (Company_UID, User_UID, Cert_Blob_Size, Cert_Format,
> After_Date, Before_Date,
> Cert_Blob, Password1, Key_Name, Cert_Blob_Type, Cert_Use, Status)
> VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
>
> Binds values:
> param[0]=1242004 /* htonl */
> param[1]=1242028 /* htonl */
> param[2]=135967325878940612 /* htonl */
> param[3]=1242076 /* htonl */
> param[4]='26/05/2015'
> param[5]='25/05/2016'
> param[6]=blob size=9529 /* blob with may can 0x0 data, obviously. */
> param[7]=3B0429150961134E
> param[8]=C:\documentos\RC SOFTWARE\clientes\asbosch\bef.pfx
> param[9]=pfx
> param[10]=S
> param[11]=A
>
> Error: insufficient data in the message
> pgsql_pexec error: PQresultStatus=7
>
> Log:
> 2016-03-16 17:35:07 BRT ERRO: dados insuficientes na mensagem
> 2016-03-16 17:35:07 BRT COMANDO: INSERT INTO tbCerts (Company_UID,
> User_UID, Cert_Blob_Size, Cert_Format, After_Date, Before_Date,
> Cert_Blob, Password1, Key_Name, Cert_Blob_Type, Cert_Use, Status) VALUES
> ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
>
> PostgreSQL 9.5.0 32bits
> Client 32 bits (libpq.dll)
>
> This is very frustrating, whats is wrog?

What client are you using to run the query?

Are you sure you do not have a one-off error. Your bind values are 0
indexed, while your parameters are not.

Could it be they are not matching up?

Hard to tell without seeing the complete code.

> How can debug this?
>
> Best,
>
> Ranier Vilela
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-03-18 00:00:31 Re: Error: insufficient data in the message
Previous Message Adrian Klaver 2016-03-17 23:48:52 Re: Database not starting in init.d