pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRAISE NOTICE
9+ messages / 4 participants
[nested] [flat]
* RAISE NOTICE
@ 2009-05-08 09:05 Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-08 11:34 ` Re: RAISE NOTICE Gerardo Herzig <gherzig@fmed.uba.ar>
2009-05-10 10:57 ` Re: RAISE NOTICE Jasen Betts <jasen@xnet.co.nz>
0 siblings, 2 replies; 9+ messages in thread
From: Luigi N. Puleio @ 2009-05-08 09:05 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
2009-05-08 09:05 RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
@ 2009-05-08 11:34 ` Gerardo Herzig <gherzig@fmed.uba.ar>
1 sibling, 0 replies; 9+ messages in thread
From: Gerardo Herzig @ 2009-05-08 11:34 UTC (permalink / raw)
To: Luigi N. Puleio <npuleio@rocketmail.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
2009-05-08 09:05 RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
@ 2009-05-10 10:57 ` Jasen Betts <jasen@xnet.co.nz>
1 sibling, 0 replies; 9+ messages in thread
From: Jasen Betts @ 2009-05-10 10:57 UTC (permalink / raw)
To: pgsql-sql
On 2009-05-08, Luigi N. Puleio <npuleio@rocketmail.com> wrote:
>
> --0-1541576050-1241773508=:80512
> Content-Type: text/plain; charset=us-ascii
>
> 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?...
postgres doesn't produce popups (your application does that)
To get notification you need to call PQsetNoticeProcessor() to register a callback function.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
@ 2009-05-08 11:38 Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-08 11:52 ` Re: RAISE NOTICE Milen A. Radev <milen@radev.net>
2009-05-08 13:40 ` Re: RAISE NOTICE Gerardo Herzig <gherzig@fmed.uba.ar>
0 siblings, 2 replies; 9+ messages in thread
From: Luigi N. Puleio @ 2009-05-08 11:38 UTC (permalink / raw)
To: Gerardo Herzig <gherzig@fmed.uba.ar>; +Cc: pgsql-sql
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...
--- On Fri, 5/8/09, Gerardo Herzig <gherzig@fmed.uba.ar> wrote:
From: Gerardo Herzig <gherzig@fmed.uba.ar>
Subject: Re: [SQL] RAISE NOTICE
To: "Luigi N. Puleio" <npuleio@rocketmail.com>
Cc: pgsql-sql@postgresql.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
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
2009-05-08 11:38 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
@ 2009-05-08 11:52 ` Milen A. Radev <milen@radev.net>
1 sibling, 0 replies; 9+ messages in thread
From: Milen A. Radev @ 2009-05-08 11:52 UTC (permalink / raw)
To: pgsql-sql
Luigi N. Puleio написа:
> 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...
[...]
I believe the fine manual is clear about this
(http://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html):
"Whether messages of a particular priority are reported to the client,
written to the server log, or both is controlled by the log_min_messages
and client_min_messages configuration variables. See Chapter 18 for more
information."
--
Milen A. Radev
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
2009-05-08 11:38 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
@ 2009-05-08 13:40 ` Gerardo Herzig <gherzig@fmed.uba.ar>
1 sibling, 0 replies; 9+ messages in thread
From: Gerardo Herzig @ 2009-05-08 13:40 UTC (permalink / raw)
To: Luigi N. Puleio <npuleio@rocketmail.com>; +Cc: pgsql-sql
Luigi N. Puleio wrote:
> --- On Fri, 5/8/09, Gerardo Herzig <gherzig@fmed.uba.ar> wrote:
>
> From: Gerardo Herzig <gherzig@fmed.uba.ar>
> Subject: Re: [SQL] RAISE NOTICE
> To: "Luigi N. Puleio" <npuleio@rocketmail.com>
> Cc: pgsql-sql@postgresql.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
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
@ 2009-05-08 12:01 Luigi N. Puleio <npuleio@rocketmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: Luigi N. Puleio @ 2009-05-08 12:01 UTC (permalink / raw)
To: Milen A. Radev <milen@radev.net>; +Cc: pgsql-sql
The fact is I have in my postgresql.conf this:
client_min_messages = notice
but if I call the function which has RAISE NOTICE it doesn't return a notice to the clienti...indeed I see it in the logfile on server status...
that's why I was asking if there is a way... maybe I could also have written wrong config for that parameter...
--- On Fri, 5/8/09, Milen A. Radev <milen@radev.net> wrote:
From: Milen A. Radev <milen@radev.net>
Subject: Re: [SQL] RAISE NOTICE
To: pgsql-sql@postgresql.org
Date: Friday, May 8, 2009, 11:52 AM
Luigi N. Puleio написа:
> 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...
[...]
I believe the fine manual is clear about this
(http://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html):
"Whether messages of a particular priority are reported to the client,
written to the server log, or both is controlled by the log_min_messages
and client_min_messages configuration variables. See Chapter 18 for more
information."
--
Milen A. Radev
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
@ 2009-05-11 06:02 Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-11 08:49 ` Re: RAISE NOTICE Jasen Betts <jasen@xnet.co.nz>
0 siblings, 1 reply; 9+ messages in thread
From: Luigi N. Puleio @ 2009-05-11 06:02 UTC (permalink / raw)
To: Jasen Betts <jasen@xnet.co.nz>; +Cc: pgsql-sql
Hello Jasen,
do you know if PQsetNoticeProcessor() is appliable to ADOQuery->Post()?
I mean if I have an event where there's ADOQuery->Post(), should I do something like:
returnvalue = ADOQuery->Post();
PQsetNoticeProcessor(ADOConnection, PQnoticeProcessor, returnvalue);
right?...
--- On Sun, 5/10/09, Jasen Betts <jasen@xnet.co.nz> wrote:
From: Jasen Betts <jasen@xnet.co.nz>
Subject: Re: [SQL] RAISE NOTICE
To: pgsql-sql@postgresql.org
Date: Sunday, May 10, 2009, 10:57 AM
On 2009-05-08, Luigi N. Puleio <npuleio@rocketmail.com> wrote:
>
> --0-1541576050-1241773508=:80512
> Content-Type: text/plain; charset=us-ascii
>
> 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?...
postgres doesn't produce popups (your application does that)
To get notification you need to call PQsetNoticeProcessor() to register a callback function.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: RAISE NOTICE
2009-05-11 06:02 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
@ 2009-05-11 08:49 ` Jasen Betts <jasen@xnet.co.nz>
0 siblings, 0 replies; 9+ messages in thread
From: Jasen Betts @ 2009-05-11 08:49 UTC (permalink / raw)
To: pgsql-sql
On 2009-05-11, Luigi N. Puleio <npuleio@rocketmail.com> wrote:
>
> --0-1686780820-1242021728=:49174
> Content-Type: text/plain; charset=us-ascii
>
> Hello Jasen,
>
> do you know if PQsetNoticeProcessor() is appliable to ADOQuery->Post()?
>
> I mean if I have an event where there's ADOQuery->Post(), should I do something like:
>
> returnvalue = ADOQuery->Post();
> PQsetNoticeProcessor(ADOConnection, PQnoticeProcessor, returnvalue);
> right?...
I suspect that you'll need to get the PQ connection from ADO
and use that in the PQsetNoticeProcessor call. this may not be easy.
OTOH ADO may already do that if you can fogure out how to enable the
feature.
> --- On Sun, 5/10/09, Jasen Betts <jasen@xnet.co.nz> wrote:
>
> From: Jasen Betts <jasen@xnet.co.nz>
> Subject: Re: [SQL] RAISE NOTICE
> To: pgsql-sql@postgresql.org
> Date: Sunday, May 10, 2009, 10:57 AM
>
> On 2009-05-08, Luigi N. Puleio <npuleio@rocketmail.com> wrote:
>>
>> --0-1541576050-1241773508=:80512
>> Content-Type: text/plain; charset=us-ascii
>>
>> 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?...
>
> postgres doesn't produce popups (your application does that)
>
> To get notification you need to call PQsetNoticeProcessor() to register a callback function.
>
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2009-05-11 08:49 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-05-08 09:05 RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-08 11:34 ` Gerardo Herzig <gherzig@fmed.uba.ar>
2009-05-10 10:57 ` Jasen Betts <jasen@xnet.co.nz>
2009-05-08 11:38 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-08 11:52 ` Milen A. Radev <milen@radev.net>
2009-05-08 13:40 ` Gerardo Herzig <gherzig@fmed.uba.ar>
2009-05-08 12:01 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-11 06:02 Re: RAISE NOTICE Luigi N. Puleio <npuleio@rocketmail.com>
2009-05-11 08:49 ` Jasen Betts <jasen@xnet.co.nz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox