Re: plpgsql

Поиск
Список
Период
Сортировка
От Kovacs Zoltan Sandor
Тема Re: plpgsql
Дата
Msg-id Pine.LNX.4.05.10012120739470.220-100000@pc10.radnoti-szeged.sulinet.hu
обсуждение исходный текст
Ответ на plpgsql  (Jie Liang <jliang@ipinc.com>)
Ответы Re: plpgsql  (Jie Liang <jliang@jliang.ipinc.com>)
Список pgsql-sql
> Hi, there,
> 
> Is there any way to handle exception ( such as cannot insert duplicate key on
> a unique index) in
> plpgsql function?
> 
> I don't want it abort whole transaction instead I want to do something else if
> it happened,
> but I don't want to use a select stmt first to waste the time.
Bad news: there is no such statement in PLPGSQL you like. My usual way to
do this is the same you wrote (SELECT first, if no rows FOUND, do the
INSERT).

Zoltan



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

Предыдущее
От: "Robert B. Easter"
Дата:
Сообщение: Re: Where Can I find JDBC driver.
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: Where Can I find JDBC driver.