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

From Sam Mason
Subject Re: Search system catalog for mystery type
Date
Msg-id 20091104180644.GR5407@samason.me.uk
Whole thread Raw
In response to Search system catalog for mystery type  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
Responses Re: Search system catalog for mystery type
List 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/

pgsql-general by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: How can I pass an array to SPI_execute_with_args()?
Next
From: Tom Lane
Date:
Subject: Re: How can I pass an array to SPI_execute_with_args()?