Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 00149650411 for ; Sat, 26 Jul 2008 21:53:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65597-02-6 for ; Sat, 26 Jul 2008 21:53:02 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by postgresql.org (Postfix) with ESMTP id 1B0276504AF for ; Sat, 26 Jul 2008 21:37:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx1.hub.org (Postfix) with ESMTP id 9BD6AB074A4 for ; Sat, 26 Jul 2008 21:37:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6R0a0IA005851; Sat, 26 Jul 2008 20:36:01 -0400 (EDT) To: "David Andersen" cc: pgsql-performance@postgresql.org Subject: Re: Using ENUM with huge NAMEDATALEN In-reply-to: References: <4191.1217108664@sss.pgh.pa.us> Comments: In-reply-to "David Andersen" message dated "Sun, 27 Jul 2008 02:13:47 +0200" Date: Sat, 26 Jul 2008 20:36:00 -0400 Message-ID: <5850.1217118960@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/231 X-Sequence-Number: 30831 "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