incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Kiessler <kiess...@inceedo.com>
Subject Re: Graffito build
Date Tue, 07 Feb 2006 14:29:44 GMT
On 2/7/06, Raj Saini <rajsaini@gmail.com> 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

Mime
View raw message