Re: PQsendQuery: Query is too long - Mailing list pgsql-general

From Doug McNaught
Subject Re: PQsendQuery: Query is too long
Date
Msg-id m36662wa9z.fsf@varsoon.denali.to
Whole thread Raw
In response to PQsendQuery: Query is too long  (Henrik Steffen <steffen@city-map.de>)
List pgsql-general
Henrik Steffen <steffen@city-map.de> writes:

> Hello all,
>
> when doing larger queries, e.g. an insert of lots of text,
> I always get "Query too long" if the query is longer then 8192 bytes.
>
> a) What exactly is the reason for this limitation? (postgres, libpq or Pg.pm?)

You don't say what software versions you're using.  The 8k tuple-size
limit has been gone in PG since 7.1, but many client-side libraries
still enforce an 8k query limit for basically stupid reasons.

> b) What can I do to avoid this limitation?

Upgrade.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: oid problem with dumping database (failed sanity check, opr with oid 280515 was not found)
Next
From: Tom Lane
Date:
Subject: Re: PQsendQuery: Query is too long