Re: ALTER TYPE RENAME

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TYPE RENAME
Дата
Msg-id 25713.1191126877@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TYPE RENAME  (Petr Jelinek <pjmodos@pjmodos.net>)
Ответы Re: ALTER TYPE RENAME  (Petr Jelinek <pjmodos@pjmodos.net>)
Список pgsql-patches
Petr Jelinek <pjmodos@pjmodos.net> writes:
> Tom Lane wrote:
>> Currently, since there's no ALTER TYPE RENAME command, this is useful
>> functionality and I wouldn't want to forbid it.  But if we provide
>> ALTER TYPE RENAME then consistency would suggest requiring people to
>> use that for composite types.
>>
> I assume ALTER TYPE RENAME should rename associated relation too, then.

Hm, I'm not entirely sure if you got the point or not.  For either
relations or composite types, there is both a pg_class entry and a
pg_type entry, and their names *must* stay in sync.  We could allow
people to rename both entries using either ALTER TABLE or ALTER TYPE,
but the general consensus seems to be that ALTER TYPE should be used
for composite types and ALTER TABLE for tables/views/etc.  The fact
that there's a pg_class entry for a composite type is really an
implementation detail that would best not be exposed to users, so
enforcing the use of the appropriate command seems reasonable to me.

            regards, tom lane

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: pgcrypto: fix for broken solaris openssl, v03
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: ALTER TYPE RENAME