Is there an equivalent in plpgsql of Oracle's DBMS_OUTPUT.PUT_LINE?

Поиск
Список
Период
Сортировка
Искать

Is there an equivalent in plpgsql of Oracle's DBMS_OUTPUT.PUT_LINE?

От:
Glenn_Wiens@via-christi.org
Дата:
I am somewhat new to PostgreSQL's procedure language, and I have not been
able to find a way to do ad-hoc outputs to the console from plpgsql
functions -- mostly for debugging purposes. Oracle has the DBMS_OUTPUT
package which included the PUT_LINE() function. Is there something like
this in plpgsql?

Thanks.


Re: Is there an equivalent in plpgsql of Oracle's DBMS_OUTPUT.PUT_LINE?

От:
Joe Conway <mail@joeconway.com>
Дата:
Glenn_Wiens@via-christi.org wrote:
> I am somewhat new to PostgreSQL's procedure language, and I have not been
> able to find a way to do ad-hoc outputs to the console from plpgsql
> functions -- mostly for debugging purposes. Oracle has the DBMS_OUTPUT
> package which included the PUT_LINE() function. Is there something like
> this in plpgsql?

Try RAISE NOTICE -- see:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=plpgsql-errors-and-messages.html

Joe

Re: Is there an equivalent in plpgsql of Oracle's DBMS_OUTPUT.PUT_LINE?

От:
Bruno LEVEQUE <bruno.leveque@net6d.com>
Дата:
Yes, you have with a syntax like :

Raise debug ''whatever you want % '', aVariable;
 
You must find more help in the manual.

Bruno

Glenn_Wiens@via-christi.org wrote:

>I am somewhat new to PostgreSQL's procedure language, and I have not been
>able to find a way to do ad-hoc outputs to the console from plpgsql
>functions -- mostly for debugging purposes. Oracle has the DBMS_OUTPUT
>package which included the PUT_LINE() function. Is there something like
>this in plpgsql?
>
>Thanks.
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>  
>

-- 
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque@net6d.com
http://www.net6d.com

FAQ