Output from PLPGSQL

Started by Amin Schoeibover 22 years ago5 messagesgeneral
Jump to latest
#1Amin Schoeib
aschoeib@4tek.de

Hi,
How can I make textoutput (for example for tracing the code) in PLPGSQL.
In Oracle you can do that using dbms.output.put_line

Thanxx

Schoeib

4Tek Gesellschaft für angewandte Informationstechnologien mbH
Schoeib Amin
Tel. +49 (0) 69 697688-132
Fax. +49 (0) 69 697688-111
http://www.4tek.de

#2Larry Rosenman
ler@lerctr.org
In reply to: Amin Schoeib (#1)
Re: Output from PLPGSQL

--On Wednesday, September 03, 2003 13:19:03 +0200 Amin Schoeib
<aschoeib@4tek.de> wrote:

Hi,
How can I make textoutput (for example for tracing the code) in PLPGSQL.
In Oracle you can do that using dbms.output.put_line

see RAISE NOTICE.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Amin Schoeib (#1)
Re: Output from PLPGSQL

hello

use raise notice ''some message'';
http://www.postgresql.org/docs/7.3/interactive/plpgsql-errors-and-messages.html
try to read documentation for plpgsq (very usefull)
http://www.postgresql.org/docs/7.3/interactive/plpgsql.html
and chapter for converison from Oracle
http://www.postgresql.org/docs/7.3/interactive/plpgsql-porting.html

bye
Pavel

On Wed, 3 Sep 2003, Amin Schoeib wrote:

Show quoted text

Hi,
How can I make textoutput (for example for tracing the code) in PLPGSQL.
In Oracle you can do that using dbms.output.put_line

Thanxx

Schoeib

4Tek Gesellschaft f�r angewandte Informationstechnologien mbH
Schoeib Amin
Tel. +49 (0) 69 697688-132
Fax. +49 (0) 69 697688-111
http://www.4tek.de

#4Richard Huxton
dev@archonet.com
In reply to: Amin Schoeib (#1)
Re: Output from PLPGSQL

On Wednesday 03 September 2003 12:19, Amin Schoeib wrote:

Hi,
How can I make textoutput (for example for tracing the code) in PLPGSQL.
In Oracle you can do that using dbms.output.put_line

RAISE NOTICE ''My counter is % with total %'',i,run_tot;

Double-quoted string as usual in plpgsql - won't handle expressions for the
string part.

--
Richard Huxton
Archonet Ltd

#5Thomas Kellerer
spam_eater@gmx.net
In reply to: Richard Huxton (#4)
Re: Output from PLPGSQL

Richard Huxton schrieb:

On Wednesday 03 September 2003 12:19, Amin Schoeib wrote:

Hi,
How can I make textoutput (for example for tracing the code) in PLPGSQL.
In Oracle you can do that using dbms.output.put_line

RAISE NOTICE ''My counter is % with total %'',i,run_tot;

Double-quoted string as usual in plpgsql - won't handle expressions for the
string part.

I'm wondering how these messages can be accessed using JDBC?

Is this stored in the Warning Object for the connection, or the statement,
or do I have to call some special methods, to read this messages?

Regards
Thomas