Re: BUG #14459: Error from query with too many binds has no message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sean(at)seantheprogrammer(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14459: Error from query with too many binds has no message
Date: 2016-12-11 00:14:31
Message-ID: 13436.1481415271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

sean(at)seantheprogrammer(dot)com writes:
> If a query is performed with more than 34464 bind parameters, the query will
> fail. This is fine, but attempting to get the error message with
> `PQresultErrorField` and `PG_DIAG_MESSAGE_PRIMARY` will return `NULL`. The
> documentation states that the `PG_DIAG_MESSAGE_PRIMARY` field is always
> present.

Hm --- it is, or should be, always present in errors returned by the
backend. I suspect this failure is occurring on the client side; libpq
does not produce broken-down fields in its error reports at the moment.
The weird limit suggests that the underlying problem is out-of-memory
while marshaling the query.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Дилян Палаузов 2016-12-11 16:49:39 base_yylex undefined in src/interface/ecpg/preproc/parser.c
Previous Message sean 2016-12-10 11:55:01 BUG #14459: Error from query with too many binds has no message