Re: Using ENUM with huge NAMEDATALEN
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: "David Andersen" <david(at)andersen(dot)gs>
- Cc: pgsql-performance(at)postgresql(dot)org
- Subject: Re: Using ENUM with huge NAMEDATALEN
- Date: Sat, 26 Jul 2008 20:36:00 -0400
- Message-id: <5850.1217118960@sss.pgh.pa.us> <text/plain>
"David Andersen" <david(at)andersen(dot)gs> 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
Home |
Main Index |
Thread Index