Re: Search system catalog for mystery type

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Search system catalog for mystery type
Date: 2009-11-04 18:06:44
Message-ID: 20091104180644.GR5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
>
> How do I search the system catalogs to find this particular "type"?

select typname, typinput, typoutput from pg_type;

may help. I've not realized before, but most types/relations seem to
appear again with an underscore (i.e. your case) for their array type.
See:

http://www.postgresql.org/docs/current/static/sql-createtype.html#SQL-CREATETYPE-NOTES

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-11-04 20:26:17 Re: How can I pass an array to SPI_execute_with_args()?
Previous Message Boszormenyi Zoltan 2009-11-04 17:50:17 How can I pass an array to SPI_execute_with_args()?