Re: DROP TABLE IF EXISTS - Mailing list pgsql-novice

From Davis, Sean (NIH/NHGRI)
Subject Re: DROP TABLE IF EXISTS
Date
Msg-id 0E3E7E8F6E23DF4C8127A063568356B50473B113@nihexchange12.nih.gov
Whole thread Raw
In response to DROP TABLE IF EXISTS  (Sean Davis <sdavis2@mail.nih.gov>)
Responses Re: DROP TABLE IF EXISTS  (William Yu <wyu@talisys.com>)
List pgsql-novice
Point taken.  However, in a perl/DBI setting, the program does die unless I
explicitly trap the error, etc.  So, it is a convenience, true enough, but
not an issue that I had to deal with in MySQL, so just thought I would ask.

Sean


-----Original Message-----
From: William Yu
To: pgsql-novice@postgresql.org
Sent: 10/25/2004 2:05 PM
Subject: Re: [NOVICE] DROP TABLE IF EXISTS

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@mail.nih.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
>

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

pgsql-novice by date:

Previous
From: William Yu
Date:
Subject: Re: DROP TABLE IF EXISTS
Next
From: aditya s
Date:
Subject: Running pgreplicator 1.1.0 in redhat linux 9.0