Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support
Date: 2005-06-02 14:58:29
Message-ID: Pine.LNX.4.44.0506021629260.4622-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-patches

On Thu, 2 Jun 2005, Tom Lane wrote:

> Neil Conway <neilc(at)samurai(dot)com> writes:
> > I should have commented on this earlier: I don't think exact Oracle
> > compatibility is _at all_ important.
>
> The results of Pavel's experiments prove that Oracle's behavior is
> pretty random --- it looks to me like the chance results of whatever

What I can speek. Oracle has session variable for saving err code of last
exception. On the start of session is zero. After executing any EXCEPTION
BLOCK is this session zeroed. I can't to see so it's buggy behavior.

We have more possibilities, because wont to implement it only for PL/pgSQL
and can do more complicated solutions. Maybe on general level, Oracle's
developers had to use only solution on session variable.

> quick-and-dirty implementation someone chose long ago, rather than
> behavior that was thought out and agreed to. I concur that we shouldn't
> feel a compulsion to match it exactly, especially seeing that we

true. Compatibility isn't tabu, but sometimes is very usefull ;-), and
motivation for future.

> aren't going to match it exactly in terms of the contents of the
> variables, let alone fine details of what they may contain at different
> times.
>

Pavel

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-06-02 15:01:56 Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support
Previous Message Tom Lane 2005-06-02 14:52:07 Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-06-02 15:01:56 Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support
Previous Message Tom Lane 2005-06-02 14:52:07 Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support