Re: error handling

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: error handling
Date: 2012-06-23 09:35:41
Message-ID: js42ld$pv5$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2012-06-20, Little, Douglas <DOUGLAS(dot)LITTLE(at)orbitz(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2012-06-23 11:12:24 Re: [ADMIN] Issue in save and retreive file in postgres
Previous Message Jasen Betts 2012-06-23 08:51:33 Re: efficiency of wildcards at both ends