Re: Simple client messages from within pgPL/SQL

From: Terry Lee Tucker <terry(at)esc1(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Simple client messages from within pgPL/SQL
Date: 2005-02-23 10:12:30
Message-ID: 200502230512.30472.terry@esc1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This may be too simplistic an answer, but can't you just have the function
return a text string and return the message you want to deliver back to the
client?

On Wednesday 23 February 2005 05:00 am, Andre Schnoor saith:
> > I'm desparately seeking for a simple way to send messages to the client
> > during the execution of large stored procedures.
> >
> > RAISE INFO 'Now Processing %', thisCustomer;
> >
> > Doesn't do it, because the client console is cluttered with verbose
>
> context
>
> > information (e.g. backtrace). It's impossible to follow these "messages".
> >
> > I'm afraid that lowering the verbosity level in the server config will
>
> also
>
> > affect error messages (where verbosity is helpful). Is there another way
>
> to
>
> > output strings to the "console"?
>
> Example:
>
>
> INFO: Total of 25130 listed songs found, 13046 of them did not perform
> today
> CONTEXT: SQL statement "SELECT sp_song_performance_reset( $1 )"
> PL/pgSQL function "sp_song_performance_batch" line 41 at select into
> variables
> SQL statement "SELECT sp_song_performance_batch( $1 )"
> PL/pgSQL function "sp_daily" line 39 at select into variables
> SQL statement "SELECT sp_daily()"
> PL/pgSQL function "sp_test_charts" line 14 at select into variables
>
>
> I only want to have the first line appear and nothing else.
> How do I suppress the CONTEXT clutter?
>
>
> Andre
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan.Ardeleanu 2005-02-23 10:24:53 Catching internal error ID's to throw custom errors. Is it possib le in PostGreSQL?
Previous Message Andre Schnoor 2005-02-23 10:00:11 Re: Simple client messages from within pgPL/SQL