Re: error handling

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: error handling
Дата
Msg-id js42ld$pv5$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на error handling  ("Little, Douglas" <DOUGLAS.LITTLE@orbitz.com>)
Список pgsql-general
On 2012-06-20, Little, Douglas <DOUGLAS.LITTLE@orbitz.com> wrote:
> --_000_8585BA53443004458E0BAA6134C5A7FBADD4CD8CEGEXCMB01owwroo_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
>
> Greenplum 4.1.2.4 (PG 8.2.3)
> We are revising how we implement functions in order to better capture and h=
> andle fatal errors.
>
> What we want to have happen,
>
> 1.       is to have the fatal error captured,
>
> 2.       logged to our processing table,
>
> 3.       then have the function & psql exit with a non-zero return code, in=
> forming Informatica of the process failure.

you're going to have to return the result as a string to the script
that calls psql and have that script generate the return code,


  retval=`psql -c "copy(select funcname('arg')) to stdout"`
  exit $retval


--
⚂⚃ 100% natural

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Feature discussion: Should syntax errors abort a transaction?
Следующее
От: Raghavendra
Дата:
Сообщение: Re: row_to_json question