![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am wondering how to do this simple mysql task in postgres. Any hints? |
#3
| |||
| |||
|
|
* Sean Davis <sdavis2 (AT) mail (DOT) 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...5/msg00102.php |
#4
| |||
| |||
|
|
* Sean Davis <sdavis2 (AT) mail (DOT) 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...5/msg00102.php |
#5
| |||
| |||
|
|
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. |
#6
| |||
| |||
|
|
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.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...5/msg00102.php |
|
drop table thetable |
#7
| |||
| |||
|
|
http://archives.postgresql.org/pgsql...5/msg00102.php what about the Ron Johnson solution? if exists (select 1 from pg_tables where tablename = "thetable") drop table thetable |
![]() |
| Thread Tools | |
| Display Modes | |
| |