Re: DROP TYPE without error?
От | Jeff Boes |
---|---|
Тема | Re: DROP TYPE without error? |
Дата | |
Msg-id | d342r1$2nsi$1@news.hub.org обсуждение исходный текст |
Ответ на | DROP TYPE without error? ("Philippe Lang" <philippe.lang@attiksystem.ch>) |
Список | 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
В списке pgsql-sql по дате отправления: