Re: [GENERAL] drop table if exists mytable;

2007-02-10 Thread Anton Melser
> I need to do a "drop table if exists" type thing. I realise I can Install 8.2 or use this function, posted by David Fetter: Thanks for your answers... so this really was something that was missing (I think it a little rich to come out with a "are you using a version without this" when it has

Re: [GENERAL] drop table if exists mytable;

2007-02-10 Thread Andreas Kretschmer
Anton Melser <[EMAIL PROTECTED]> schrieb: > Hi, > I need to do a "drop table if exists" type thing. I realise I can Install 8.2 or use this function, posted by David Fetter: -- -- posted by David Fetter -- CREATE OR REPLACE FUNCTION drop_table(TEXT) RETURNS VOID STRICT LANGUAGE plpgsql AS $$ BEG

Re: [GENERAL] drop table if exists mytable;

2007-02-10 Thread Gurjeet Singh
I am not sure if I understood the problem correctly!!! Can you not use the standard command "DROP TABLE IF EXISTS table1" that PG provides? http://www.postgresql.org/docs/8.2/interactive/sql-droptable.html Or is it that you are on a version of PG where "IF EXISTS" syntax is not available? Rega

[GENERAL] drop table if exists mytable;

2007-02-10 Thread Anton Melser
Hi, I need to do a "drop table if exists" type thing. I realise I can easily look in pg_tables, but for testing (if), don't I need to use a procedural language? In which case, I will need to install it if it doesn't exist - but I don't know how to test to see whether a language exists without usin