| From: | Patrick Refondini <patrick(dot)refondini(at)pobox(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: RAISE function misuse ? |
| Date: | 2006-04-05 09:13:42 |
| Message-ID: | 44338A46.6060500@pobox.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Michael Fuhr wrote:
> On Mon, Apr 03, 2006 at 05:44:18PM +0200, Patrick Refondini wrote:
>
>>idns_target=# select test();
>>INFO: hello !
>>CONTEXT: SQL statement "SELECT hello()"
>>PL/pgSQL function "test" line 2 at perform
>
>
> [...]
>
>
>>1. Is there anything wrong using RAISE this way.
>
>
> Not in the sense of the code doing something it shouldn't.
Is there a better way to output text from within a function ?
>
>
>>2. Is there a way to get rid of the output:
>>CONTEXT: SQL statement "SELECT hello()"
>>PL/pgSQL function "test" line 2 at perform
>
>
> test=> \set VERBOSITY terse
Great ! Exactely what I was looking for.
Thanks,
Patrick
> test=> select test();
> INFO: hello !
> test
> ------
>
> (1 row)
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Frank Church | 2006-04-05 10:16:06 | Looking for good PostgreSQL hosters |
| Previous Message | Clive Page | 2006-04-05 08:59:22 | Column descriptions - could they be propagated to new tables? |