Re: DROP TABLE IF EXISTS

From: "Davis, Sean (NIH/NHGRI)" <sdavis2(at)mail(dot)nih(dot)gov>
To: 'William Yu ' <wyu(at)talisys(dot)com>, "'pgsql-novice(at)postgresql(dot)org '" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: DROP TABLE IF EXISTS
Date: 2004-10-25 20:28:29
Message-ID: 0E3E7E8F6E23DF4C8127A063568356B50473B113@nihexchange12.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)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(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
>

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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message aditya s 2004-10-26 01:56:10 Running pgreplicator 1.1.0 in redhat linux 9.0
Previous Message William Yu 2004-10-25 18:05:36 Re: DROP TABLE IF EXISTS