Skip site navigation (1) Skip section navigation (2)

ALTER TYPE RENAME

From: Petr Jelinek <pjmodos(at)pjmodos(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Subject: ALTER TYPE RENAME
Date: 2007-09-29 06:22:28
Message-ID: 46FDEF24.5050908@pjmodos.net (view raw or flat)
Thread:
Lists: pgsql-patches
Hi,
I noticed we don't have ALTER TYPE foo RENAME TO bar command which would 
be handy for me especially for enum types.
So I wrote this little patch (including very brief doc) which adds above 
syntax. It basically just does some checks and calls existing TypeRename 
function which is used for renaming table rowtype now.
I hope I haven't missed anything, but I am unsure about two things. 
First, this patch allows renaming base types which I don't know if it's 
desired. And second we might want to throw error when renaming rowtype 
(there is check in AlterTypeOwner for this but not in AlterTypeNamespace 
so I don't know).

-- 
Regards
Petr Jelinek (PJMODOS)


Attachment: typerename.diff
Description: text/plain (5.0 KB)

Responses

pgsql-patches by date

Next:From: Petr JelinekDate: 2007-09-29 06:25:14
Subject: Add chklocale.c to msvc build
Previous:From: Brendan JurdDate: 2007-09-29 03:02:10
Subject: Re: [HACKERS] Add function for quote_qualified_identifier?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group