> Hello,
> I am trying to write a piece of SQL code, which will first check if a
> table exist, drop it and then recreate it. I didn't see any 'IF' syntax
> in pgsql. Is there any other alternative? I tried to use 'case'
> structure, but didn't succeed.
> Thanks and regards.
> -Samik
>
Is there reason the table must not exist before you drop it?
When I write SQL scripts (to be fed in to psql) I just go ahead
and drop the table (whether it is really there or not) and if it
does not exist, there is a warning, but the script keeps running.