Re: maximum size limit for a query string? - Mailing list pgsql-general

From Josh Kupershmidt
Subject Re: maximum size limit for a query string?
Date
Msg-id BANLkTim3A-YXWcn5XYUv_eQ=74qQ4t+TXQ@mail.gmail.com
Whole thread Raw
In response to Re: maximum size limit for a query string?  (Andreas Kretschmer <akretschmer@spamfence.net>)
List pgsql-general
On Tue, Jun 7, 2011 at 2:38 PM, Andreas Kretschmer
<akretschmer@spamfence.net> wrote:
> Yeah, i think, 16 MByte isn't the real limit, yes. And i've seen
> queries larger than that limit, but i can't find the link, sorry.
> (maybe depesz.com, dunno, can't remember, i'm sorry)

The thread linked seems to mainly be talking about MySQL, which has a
max_allowed_packet limit of something like 16 MB by default, but can
be adjusted upwards[1]. For Postgres, we can have COPY statements sent
over the network, limited only by your disk space, since these are
sent (and parsed, I think) buffer-by-buffer. If you do
  pg_dump --table=big_table | pg_restore
you should see a giant COPY statement constructed; these can obviously
be arbitrarily large.

As for SQL statements that have to be constructed in-memory on the
client, and parsed/planned on the server all-at-once, I don't know of
any limits, other than maybe running out of memory somewhere.

Josh

--
[1] http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

pgsql-general by date:

Previous
From: Vibhor Kumar
Date:
Subject: Re: maximum size limit for a query string?
Next
From: "David Johnston"
Date:
Subject: Re: maximum size limit for a query string?