Thread: SQL statement is too long

SQL statement is too long

From
"Miia Leino"
Date:
Hi!
I'm using PostgreSQL 7.2.3-2. Now with one insert that is trying to put
long string to the text typed field postgre is giving an error SQL
statement is too long.
Should I change some conf value in some conf file or what? This blocksize
shouldnt be in use anymore in newest versions??
Thanks for advance
Miia

Re: SQL statement is too long

From
Tom Lane
Date:
"Miia Leino" <miia.leino@zeerio.com> writes:
> I'm using PostgreSQL 7.2.3-2. Now with one insert that is trying to put
> long string to the text typed field postgre is giving an error SQL
> statement is too long.

The backend limit on SQL statement length was long gone in 7.2.  But
IIRC there were still some client libraries that hadn't gotten the word,
and would "helpfully" complain instead of sending what had once been an
overlength query.

The short answer is to update your Postgres installation, client
libraries as well as server.  7.2.3 is pretty long in the tooth anyway.

            regards, tom lane