On 2/7/06, Raj Saini <[EMAIL PROTECTED]> wrote:
> Christophe Lombart wrote:
>
> >OK, the scripts used to drop the db are missing for Postgres. You
> >should create a new folder similar to
> >"components/src/sql/GraffitoServer/mysql".
> >
> >
> >
> Yes I figured that out. Now problem is maven build fails it tries to
> drop a non existing table. Postgres does not have "if exists" like
> clause. Just trying to figure what could be an alternative.

You can find out if a table exists by querying the internal "pg_class" table:

SELECT relname FROM pg_class
 WHERE relname = 'mytable';

Maybe a little function wrapper helps...

- Oliver

Reply via email to