Re: drop table before create

Поиск
Список
Период
Сортировка
От Lee Harr
Тема Re: drop table before create
Дата
Msg-id BAY7-F188B6F1079A91B12F42A92B1AB0@phx.gbl
обсуждение исходный текст
Ответ на drop table before create  (Mark Probert <probertm@acm.org>)
Ответы Re: drop table before create  ("A. Kretschmer" <akretschmer@despammed.com>)
Список pgsql-general
>I have not been able to work out how to do this is Postgres 8
>(pseudo-code)
>
>  if exists table foo
>    drop table foo;
>  end
>  create table foo;
>
>If I go with
>
>   drop table foo;
>   create table foo;
>
>then it barfs on an empty db.


>The assumption here is that the SQL is coming in on a script via the
>programmatic interface.  Slurp in a bunch of SQL commands and then fire
>them at the database.
>


There are a couple of commands that may help you:

\set ON_ERROR_STOP
\unset ON_ERROR_STOP

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: Postgresql replication
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Postgresql replication