Re: Search system catalog for mystery type - Mailing list pgsql-general

From Tom Lane
Subject Re: Search system catalog for mystery type
Date
Msg-id 20721.1257366749@sss.pgh.pa.us
Whole thread Raw
In response to Re: Search system catalog for mystery type  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
Sam Mason <sam@samason.me.uk> writes:
> On Wed, Nov 04, 2009 at 11:31:55AM -0500, Carlo Stonebanks wrote:
>> When I try the following command:
>> ALTER TABLE mdx_core.audit_impt RENAME TO _audit_impt;
>>
>> ERROR: type "_audit_impt" already exists

You aren't going to be able to do that, because of the conflict with the
array type for it.

It might work to rename the array type out of the way --- I think that
in all PG releases where we have array of composite, the underscore
prefix is only a convention and not the hard-wired way of finding
the array type for a given element type.

There is some code in there to rename array types out of the way
automatically, but I think it only works during CREATE not RENAME.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How can I pass an array to SPI_execute_with_args()?
Next
From: Alvaro Herrera
Date:
Subject: Re: Search system catalog for mystery type