Re: Using ENUM with huge NAMEDATALEN

От: Tom Lane
Тема: Re: Using ENUM with huge NAMEDATALEN
Дата: ,
Msg-id: 5850.1217118960@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Using ENUM with huge NAMEDATALEN  ("David Andersen")
Список: pgsql-performance

Скрыть дерево обсуждения

Using ENUM with huge NAMEDATALEN  ("David Andersen", )
 Re: Using ENUM with huge NAMEDATALEN  (Tom Lane, )
  Re: Using ENUM with huge NAMEDATALEN  ("David Andersen", )
   Re: Using ENUM with huge NAMEDATALEN  ("David Andersen", )
    Re: Using ENUM with huge NAMEDATALEN  (Tom Lane, )

"David Andersen" <> writes:
> I am attempting to alter pg_enum.enumlabel to Text, but I seem to run into a
> strange permission problem with regards to system tables. I am not allowed
> to modify them even if I am a superuser.

ALTER TABLE is hardly gonna be sufficient on a system catalog anyway, as
knowledge of its rowtype is generally hardwired into the C code.  You'd
have to modify src/include/catalog/pg_enum.h and then go around and find
all the references to enumlabel and fix them to know it's text not name.
Fortunately, this being not a widely used catalog, there shouldn't be
too many places to fix.  Right offhand, it looks like the indexing.h
definition of its index and about three places in pg_enum.c would be all
that have to change.

Note that this would be an initdb-forcing change and so you should also
bump the catversion number.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Using ENUM with huge NAMEDATALEN
От: Faludi Gábor
Дата:
Сообщение: how does pg handle concurrent queries and same queries