Re: Error: insufficient data in the message - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Error: insufficient data in the message
Date
Msg-id 56EB4424.80103@aklaver.com
Whole thread Raw
In response to Error: insufficient data in the message  (Ranier VF <ranier_gyn@hotmail.com>)
List 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.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Database not starting in init.d
Next
From: Tom Lane
Date:
Subject: Re: Error: insufficient data in the message