From: | Jaime Casanova <systemguards(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: DROP TABLE IF EXISTS |
Date: | 2004-10-26 20:51:34 |
Message-ID: | 20041026205134.34093.qmail@web50004.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
--- William Yu <wyu(at)talisys(dot)com> escribió:
> I'm not sure why this even matters. You do DROP
> TABLE on a table that
> doesn't exist, all that will happen is that you will
> get an error back
> but your program will continue on it's merry way
> anyways. The only thing
> IF EXISTS would give you is the suppression of the
> error message.
>
>
> Steven Klassen wrote:
>
> > * Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> [2004-10-21
> 12:26:47 -0400]:
> >
> >
> >>I am wondering how to do this simple mysql task in
> postgres. Any
> >>hints?
> >
> >
> > This reply from Ron Johnson seems to suffice:
> >
> >
>
http://archives.postgresql.org/pgsql-interfaces/2002-05/msg00102.php
what about the Ron Johnson solution?
if exists (select 1 from pg_tables where tablename =
"thetable")
> drop table thetable
regards,
Jaime Casanova
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Davis | 2004-10-26 21:35:55 | Re: DROP TABLE IF EXISTS |
Previous Message | Vishal Kashyap @ [Sai Hertz And Control Systems] | 2004-10-26 17:35:02 | Re: Function error |