Skip site navigation (1) Skip section navigation (2)

Re: Can we use sqlcode in functions of plpgsql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: tushar nehete <tpnehete(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can we use sqlcode in functions of plpgsql
Date: 2011-10-07 10:56:16
Message-ID: CAFj8pRB9o06vzWwaQV93k--Q8+vvhHjoZKH9ckmq_WROmSAbKA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hello

2011/10/7 tushar nehete <tpnehete(at)gmail(dot)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
>
>

In response to

pgsql-general by date

Next:From: Bruce MomjianDate: 2011-10-07 14:05:11
Subject: Re: In which case PG_VERSION file updates ?
Previous:From: Vincent de PhilyDate: 2011-10-07 10:54:04
Subject: Re: Never-idle autovacuum, and does (auto)vacuuming fill the OS cache ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group