Re: [INTERFACES] psql ERROR : Character Types Tuple is too big: size xxxxx

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] psql ERROR : Character Types Tuple is too big: size xxxxx
Дата
Msg-id 29531.947864054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на psql ERROR : Character Types Tuple is too big: size xxxxx  (Compte utilisateur Sultan-advl <webmaster@advl.org>)
Ответы Re: [NOVICE] Re: [INTERFACES] psql ERROR : Character Types Tuple is too big: size xxxxx  ("D. Duccini" <duccini@backpack.com>)
Список pgsql-interfaces
Compte utilisateur Sultan-advl <webmaster@advl.org> writes:
> newkiwi=> insert into localisation values ('999', 'ee', 'ff', '999', 'gg',
> 'hh', 'ii', 'jj', '999');
> ERROR:  Tuple is too big: size 12356
> newkiwi=> \d localisation
> Table    = localisation
> +----------------------------------+----------------------------------+-------+
> |              Field               |              Type                | Length|
> +----------------------------------+----------------------------------+-------+
> | id_loc                           | int4 not null                    |     4 |
> | voie_loc                         | char()                           |  2048 |
> | codebat_loc                      | char()                           |  2048 |
> | idplan_loc                       | int4                             |     4 |
> | xplan_loc                        | char()                           |  2048 |
> | yplan_loc                        | char()                           |  2048 |
> | acces_loc                        | char()                           |  2048 |
> | accesen_loc                      | char()                           |  2048 |
> | id_ville_loc                     | int4                             |     4 |
> +----------------------------------+----------------------------------+-------+

Well, you've got six fixed-size 2K fields, which are going to take up
12K all by themselves, plus there's a few dozen bytes of overhead.

I'd suggest using varchar or text instead of char --- do you really
need 12K of blank-padding in every record?

            regards, tom lane

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

Предыдущее
От: Compte utilisateur Sultan-advl
Дата:
Сообщение: psql ERROR : Character Types Tuple is too big: size xxxxx
Следующее
От: Mark Bedish
Дата:
Сообщение: unsubscribe