From: | "Gregory Wood" <gregw(at)com-stock(dot)com> |
---|---|
To: | "Craig L(dot) Ching" <cching(at)mqsoftware(dot)com>, "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Re: Test for existence of Table |
Date: | 2001-01-05 18:15:59 |
Message-ID: | 001f01c07743$94da42e0$7889ffcc@comstock.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> >> DROP TABLE employees
> >Error: ERROR: Relation 'employees' does not exist
> >
> >And execution halts.... which is I believe why he wanted to check for the
> >existence before trying to DROP. I'd love to know if this exists as
well...
> >would come in very handy during development time.
>
> Execution does not halt, it continues and creates the table. I rely on
this
> functionality, so I know it works. Good luck!
Well, that is a quote from the database tool I use, and execution does
indeed halt. I can only assume you are using psql, which someone confirmed
that that does work. Also, if you wrap your queries in an explicit
transaction (I don't like to leave anything to Auto-Commit), it will also
fail:
NOTICE: current transaction is aborted, queries ignored until end of
transaction block
What would be nice is if there were a way to only DROP a table if it exists.
But I would consider this to be rather low priority.
Greg
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Teglasi | 2001-01-05 18:25:28 | Using Postgres with Access 2000 |
Previous Message | Craig L. Ching | 2001-01-05 17:41:36 | RE: Re: Test for existence of Table |