Re: Search system catalog for mystery type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Search system catalog for mystery type
Date: 2009-11-04 20:32:29
Message-ID: 20721.1257366749@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sam Mason <sam(at)samason(dot)me(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-11-04 20:57:34 Re: Search system catalog for mystery type
Previous Message Tom Lane 2009-11-04 20:26:17 Re: How can I pass an array to SPI_execute_with_args()?