Re: length of insert stmt?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: length of insert stmt?
Дата
Msg-id 006901c0a7e3$56336f00$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на length of insert stmt?  ("chris markiewicz" <cmarkiew@commnav.com>)
Список pgsql-general
From: "chris markiewicz" <cmarkiew@commnav.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


В списке pgsql-general по дате отправления:

Предыдущее
От: "Daniel A. Melo"
Дата:
Сообщение: compilation error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: length of insert stmt?