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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to