Re: RAISE NOTICE

From: Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>
To: "Luigi N(dot) Puleio" <npuleio(at)rocketmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: RAISE NOTICE
Date: 2009-05-08 13:40:17
Message-ID: 4A043641.7040700@fmed.uba.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Luigi N. Puleio wrote:

> --- On Fri, 5/8/09, Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar> wrote:
>
> From: Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>
> Subject: Re: [SQL] RAISE NOTICE
> To: "Luigi N. Puleio" <npuleio(at)rocketmail(dot)com>
> Cc: pgsql-sql(at)postgresql(dot)org
> Date: Friday, May 8, 2009, 11:34 AM
>
> Luigi N. Puleio wrote:
>> Hello everyone...
>>
>> I have a PL/PgSQL function where I use RAISE NOTICE but this kind of RAISE can't be shown on windows with a popup message like the EXCEPTION, indeed it goes to log messages list..
>> So, is there any way to show a popup message with a custom textmessage on it from a PL/PgSQL function?...
>>
>> Thanks to all in advance,
>> Ciao
>> Luigi
>>
>>
>>
>>
> That looks like a sql-client (pgAdmin, pgAccess,?) implementation
> feature, isnt?
>
> Gerardo
>
> Sort of....the message should come along a standalone application too
when with an ADO component I do a Post() which calls the function...just
the matter is I can't modify the application to manage a possibly
notification...only the postgresql's function...
> That's why I'm asking about a possibility to get a notification from
the function like it's an EXCEPTION...
>

Well, in that case, the ADO component is the client. This is the place
to modify de code, to capture the NOTICE. Im shure the ADO (or any other
component who actually connect to the database and makes the query) has
the ability to react when an EXCEPTION is thrown. My guess is that
EXCEPTION's goes trough StandardError, but NOTICE's goes trough
StandardOutput, and that could be some idea why your app is not getting
notice about NOTICES :)

I will wait for some expert dude to respond this, because im going
myself into unknown territory.

Gerardo

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2009-05-08 14:55:35 Re: Distinct oddity
Previous Message Luigi N. Puleio 2009-05-08 12:01:45 Re: RAISE NOTICE