Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild
Дата
Msg-id 4A244AA6.4090907@agliodbs.com
обсуждение исходный текст
Ответ на Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild  (Jeff Davis <pgsql@j-davis.com>)
Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers
> Yeah, this has been discussed before; I think it's even in the TODO
> list.

I couldn't find it.  At least, not under data types, and also not with 
the keyword "typemod".  Anyone see it?

> The stumbling block has been to identify a reasonably clean way
> of determining which datatype changes don't require a scan.

Yep.  One possibility I'm thinking is supplying a function for each type 
which takes two typemods (old and new) and returns a value (none, check, 
rebuild) which defines what we need to do: nothing, check but not 
rebuild, or rebuild.  Default would be rebuild.  Then the logic is 
simple for each data type.

Note that this doesn't deal with the special case of VARCHAR-->TEXT, but 
just with changing typemods.  Are there other cases of data *type* 
conversions where no check or rebuild is required?  Otherwise we might 
just special case VARCHAR-->TEXT.

Oh, here's a general case: changing DOMAINs on the same base type should 
only be a check, and changing from a DOMAIN to its own base type should 
be a none.

-- 
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com


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

Предыдущее
От: Guillaume Smet
Дата:
Сообщение: Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild