Re: length of insert stmt?

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: <cmarkiew(at)commnav(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: length of insert stmt?
Date: 2001-03-08 15:20:37
Message-ID: 006901c0a7e3$56336f00$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>

> hello
>
> i received an error when someone ran an input stmt with a very long sting.
> the field is of type 'text'. The error (along with the statement) are
shown
> below. what is the proper way do execute this insert?
>
> The SQL Statement is too long - INSERT INTO accessor_group ( groupid,
> groupname, grouptype, groupclassname, groupdescription, hidden ) VALUES (

[snip >8k of insert]

> Any information/comments would be appreciated.
>
> thanks
> chris

You've hit the infamous 8k limit in Postgres. This applies to database rows
and there is a similar limit to SQL queries. It looks like the SQL limit is
hit here.

You can recompile to increase this up to 32k (see the mailing list archives
for loads on this) or try switching to 7.1 (still in beta) which offers
something called TOAST for storage of large text-fields.

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-08 15:27:32 Re: length of insert stmt?
Previous Message Gavin Sherry 2001-03-08 15:11:11 Re: length of insert stmt?