Quoting Philippe Lang <[EMAIL PROTECTED]>:

> 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.

I've got a similar request for other objects that do/do not exist.
Maybe it's just that I got lazy using MSSQL, but it sure was convenient
to have:

   IF object_id('WorkTable') IS NULL
       CREATE TABLE WorkTable(...
etc.

Given that you cannot just execute an anonymous block of PL/PGSQL code,
where you could do the test AND the create ...

-- 
"Dreams come true, not free."


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to