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