Re: Create table if not exists ... how ??

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Create table if not exists ... how ??
Дата
Msg-id 20100720132745.GD7584@samason.me.uk
обсуждение исходный текст
Ответ на Re: Create table if not exists ... how ??  (Jennifer Trey <jennifer.trey@gmail.com>)
Список pgsql-general
On Tue, Jul 20, 2010 at 10:18:59AM +0100, Jennifer Trey wrote:
> What is the most generic exception in postgres ? Throwable in Java ?

AFAIR, from programming Java many moons ago, you really don't want to go
about catching the most general exception.  The ThreadDeath exception
for instance is derived from Error rather than Exception for this
reason.

That said, maybe you want the "magic" exception type OTHERS, i.e:

  EXCEPTION WHEN OTHERS THEN

PG doesn't have as flexible hierarchy as Java, but a match is considered
to have occurred upto the first zero in the error code.  So you could
also use syntax_error_or_access_rule_violation or transaction_rollback.

--
  Sam  http://samason.me.uk/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Oluwatope Akinniyi
Дата:
Сообщение: I think you'll like it!
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Need a better way to do my constraints