From: | Jeff Boes <jboes(at)nexcerpt(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: DROP TYPE without error? |
Date: | 2005-04-07 19:48:49 |
Message-ID: | d342r1$2nsi$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Philippe Lang wrote:
> Hi,
>
> Since it is not possible to use CREATE OR REPLACE TYPE, is there a way
> of using DROP TYPE on a non-existing type, without causing the entire
> script to abort? It may sound crazy to ask for this, but it could be
> really useful in my case, where Pl/Pgsql and Pl/Perl code is being
> generated automatically, based on data found in a database.
>
If I understand you correctly, then this might be useful:
begin;
select now();
\o tmp.tmp
\qecho 'drop type \"foofookitty\";'
\o
\! psql -f tmp.tmp
select now();
commit;
--
Jeff Boes Vox 269-226-9550 x24
Director of Software Development Fax 269-349-9076
Exfacto! Exceptional Online Content http://www.exfacto.com
Nexcerpt ...Extend Your Expertise... http://www.nexcerpt.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Addleman | 2005-04-07 20:24:53 | Re: DROP TYPE without error? |
Previous Message | Ragnar Hafstað | 2005-04-07 15:51:54 | Re: 9.17.5. Row-wise Comparison |