Re: [SQL] how to change the type

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: [SQL] how to change the type
Дата
Msg-id 20011206183802.E30420-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: [SQL] how to change the type  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: [SQL] how to change the type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 7 Dec 2001, Christopher Kings-Lynne wrote:

> OK, I'm kind of interested now in how the variable length attributes are
> actually stored on disk, that you are able to increase them, but not
> decrease?
>
> I would have thought the other way around?

IIRC, the values are stored as length + data.  I think char() might
do wierd things (I don't know if the trailing spaces are stored), but
varchar() and text should be expandable because anything that could have
fit before should still fit and look the same.  Going down is
problematic, because if you have a varchar(5) field where one value is say
'abcd' and you make it varchar(3) what happens?




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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: OIDs missing in pg_attribute?
Следующее
От: mlw
Дата:
Сообщение: Re: Remote connections?