Re: enums
От | Andrew Dunstan |
---|---|
Тема | Re: enums |
Дата | |
Msg-id | 43628611.2020906@dunslane.net обсуждение исходный текст |
Ответ на | Re: enums ("Jim C. Nasby" <jnasby@pervasive.com>) |
Ответы |
Re: enums
|
Список | pgsql-hackers |
Jim C. Nasby wrote: >>>> >>>> >>>But why force a re-write of the entire table just to change the name of >>>something? >>> >>> >>> >>> >>Because you are not just changing the name of something. >> >> > >No, I was refering specifically to the case of wanting to rename >something. IE: you setup an enum for sky colors (blue, black), and then >the PHB issues an edict that the daytime sky is now green. In this case >you (or at least I) don't want to define a new enum, I just want to >change 'blue' to 'green' in that enum. There's no reason it needs to hit >the table at all. > > Well, with enumkit you can't, because the values are hardwired in the .so file. With a builtin facility you would be able to, because the values would live in the catalog. However, hacking the catalog is not something I would encourage - what you are suggesting basically breaks the abstraction. But sure, it would be possible. I would not provide an SQL level facility to do it, though. My approved way to do it would be like the example I gave earlier. cheers andrew
В списке pgsql-hackers по дате отправления: