Thread: So maybe SQLERRM? Sb knows how to check it?

So maybe SQLERRM? Sb knows how to check it?

From
"Gorodowienko Daniel"
Date:
Maybe I ask another way.
In Oracle there is a variable SQLERRM, where error message is placed.
How to get some message in PostgreSQL?
I searched documentation 3 or 5 times, and Google, and wrote on forums
topics and I have enough.


----------------------------------------------------------------------
Startuj z INTERIA.PL! >>> http://link.interia.pl/f186c


Re: So maybe SQLERRM? Sb knows how to check it?

From
Alvaro Herrera
Date:
On Wed, Jun 08, 2005 at 08:03:40PM +0200, Gorodowienko Daniel wrote:
> Maybe I ask another way.
> In Oracle there is a variable SQLERRM, where error message is placed.
> How to get some message in PostgreSQL?
> I searched documentation 3 or 5 times, and Google, and wrote on forums
> topics and I have enough.

No, we don't have SQLERRM support yet.  If you were asking about getting
the messages from RAISE EXCEPTION, I'm afraid there's no way to get it
in the EXCEPTION clause.

If you want to contribute it, patches are welcome ...

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Escucha y olvidarás; ve y recordarás; haz y entenderás" (Confucio)

Re: So maybe SQLERRM? Sb knows how to check it?

From
Neil Conway
Date:
Alvaro Herrera wrote:
> No, we don't have SQLERRM support yet.  If you were asking about getting
> the messages from RAISE EXCEPTION, I'm afraid there's no way to get it
> in the EXCEPTION clause.
>
> If you want to contribute it, patches are welcome ...

Actually, Pavel Stehule sent in a patch for this a few days ago, which
I'll be reviewing and apply to HEAD shortly -- it will be in 8.1.

-Neil


Re: So maybe SQLERRM? Sb knows how to check it?

From
Alvaro Herrera
Date:
On Thu, Jun 09, 2005 at 12:25:19PM +1000, Neil Conway wrote:
> Alvaro Herrera wrote:
> >No, we don't have SQLERRM support yet.  If you were asking about getting
> >the messages from RAISE EXCEPTION, I'm afraid there's no way to get it
> >in the EXCEPTION clause.
> >
> >If you want to contribute it, patches are welcome ...
>
> Actually, Pavel Stehule sent in a patch for this a few days ago, which
> I'll be reviewing and apply to HEAD shortly -- it will be in 8.1.

Huh, I meant a patch for getting the error message from RAISE EXCEPTION.
Does Pavel's patch address that too?

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"Endurecerse, pero jamás perder la ternura" (E. Guevara)

Re: So maybe SQLERRM? Sb knows how to check it?

From
Neil Conway
Date:
Alvaro Herrera wrote:
> Huh, I meant a patch for getting the error message from RAISE EXCEPTION.
> Does Pavel's patch address that too?

Yes.

(I just posted a revised patch to -patches, I'll apply it later tonight.)

-Neil