Re: Can we use sqlcode in functions of plpgsql - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Can we use sqlcode in functions of plpgsql
Date
Msg-id CAFj8pRB9o06vzWwaQV93k--Q8+vvhHjoZKH9ckmq_WROmSAbKA@mail.gmail.com
Whole thread Raw
In response to Can we use sqlcode in functions of plpgsql  (tushar nehete <tpnehete@gmail.com>)
List pgsql-general
Hello

2011/10/7 tushar nehete <tpnehete@gmail.com>:
> Hi,
> For backward compatibility and some other reasons we want to use
> SQLCODE in our functions of PLPGSQL.
> But in Postgres Server 9.0 it gives error for SQLCODE.
> Is there any way to use SQLCODE in functions of PLPGSQL at the place of
> SQLSTATE?

you can hack PL/pgSQL source code. There are no other way

> Also what is the datatype of SQLSTATE?

char(5)

Regards

Pavel Stehule
>
>

pgsql-general by date:

Previous
From: Vincent de Phily
Date:
Subject: Re: Never-idle autovacuum, and does (auto)vacuuming fill the OS cache ?
Next
From: Bruce Momjian
Date:
Subject: Re: In which case PG_VERSION file updates ?