Re: [HACKERS] varchar size

Поиск
Список
Период
Сортировка
От darrenk@insightdist.com (Darren King)
Тема Re: [HACKERS] varchar size
Дата
Msg-id 9801081631.AA89094@ceodev
обсуждение исходный текст
Список pgsql-hackers
> I have applied the following patch to allow varchar() fields to store
> just the needed bytes, and not the maximum size.
>
> ...
>
> And if I create a varchar(2000), it does not take several 8k blocks to
> store 10 rows, like it did before.

Fixes the following "problem" too...

Currently, you can create a table with attributes that _can_ total more
than the max_tup_size if they maximum size, but not be able to insert
valid data into all of them.

For instance, ...

create table foo (bar varchar(4000),
                  bah varchar(3000),
                  baz varchar(2000));

... is fine as long as one of the attributes is null.  Now you can have
non-null values for all three as long as they don't go over max_tup_size
in _total_.

darrenk


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Did the patch get recieved?
Следующее
От: darrenk@insightdist.com (Darren King)
Дата:
Сообщение: Disk block size issues.