Re: [PATCHES] ALTER TYPE RENAME

2008-03-19 Thread Bruce Momjian
This has been applied by Tom. --- Petr Jelinek wrote: > Tom Lane wrote: > > 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_typ

Re: [PATCHES] ALTER TYPE RENAME

2008-03-19 Thread Tom Lane
Petr Jelinek <[EMAIL PROTECTED]> writes: > Anyway, I am sending second version of the patch. Applied with minor corrections. regards, tom lane -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [PATCHES] ALTER TYPE RENAME

2007-11-04 Thread Bruce Momjian
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Petr Jelinek wrote: > Hi, > I noticed we don't have ALTER TYPE foo RENAME TO bar command which would > be handy for

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Petr Jelinek
Tom Lane wrote: 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 g

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Tom Lane
Petr Jelinek <[EMAIL PROTECTED]> 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

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Petr Jelinek
Tom Lane wrote: BTW, another issue this brings up is whether we should reject regression=# create type footyp as (f2 int); CREATE TYPE regression=# alter table footyp rename to foobar; ALTER TABLE Currently, since there's no ALTER TYPE RENAME command, this is useful functionality and I wouldn't

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Tom Lane
BTW, another issue this brings up is whether we should reject regression=# create type footyp as (f2 int); CREATE TYPE regression=# alter table footyp rename to foobar; ALTER TABLE Currently, since there's no ALTER TYPE RENAME command, this is useful functionality and I wouldn't want to forbid it

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Tom Lane
I wrote: > Hm, it's definitely a bug/oversight that AlterTypeNamespace doesn't make > a similar test for that. On closer look, there *is* such a test, but it's down inside AlterTypeNamespaceInternal. regards, tom lane ---(end of broadcast)-

Re: [PATCHES] ALTER TYPE RENAME

2007-09-29 Thread Tom Lane
Petr Jelinek <[EMAIL PROTECTED]> writes: > 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 existi