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
Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild Re: Suggested TODO: allow ALTERing of typemods without heap/index rebuild |
Список | 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 по дате отправления: