Thread: input buffer overflow, can't enlarge buffer because scanner uses REJECT

input buffer overflow, can't enlarge buffer because scanner uses REJECT

From
Kevin Murphy
Date:
Hi,

I'm using PG 7.2.3 , and a PL/pgSQL script is failing while trying to insert a
very long constant string into a column of type 'text'.   Actually, the PG
backend just closes the connection to the client.  The error message, which
is given in the server log, is "input buffer overflow, can't enlarge buffer
because scanner uses REJECT".  I looked in the .conf file but didn't see
anything like a configurable input buffer size.

Any clues as to how to get around this?

Thanks,
Kevin


Kevin Murphy <murphy2@speakeasy.net> writes:
> I'm using PG 7.2.3 , and a PL/pgSQL script is failing while trying to insert a
> very long constant string into a column of type 'text'.   Actually, the PG
> backend just closes the connection to the client.  The error message, which
> is given in the server log, is "input buffer overflow, can't enlarge buffer
> because scanner uses REJECT".  I looked in the .conf file but didn't see
> anything like a configurable input buffer size.

> Any clues as to how to get around this?

How long is "very long"?

One way around it would be to pass the constant as a parameter instead
of embedding it into the plpgsql function's text.

            regards, tom lane