By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,807 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,807 IT Pros & Developers. It's quick & easy.

How to debug pl/pgSQL -script?

P: n/a
Hi,
I'm writing some simple triggers and functions for a postgres database, andI'm wondering how to go about to debug a pl/pgSQL-script. Is there a way to echo variable-content to screen, or to file? Or is there other, more advanced ways of debugging such scripts?

regards Jonas:))

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ra
Hi,
http://www.postgresql.org/docs/7.4/s...-messages.html

Albert

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #2

P: n/a
On Fri, Oct 01, 2004 at 03:05:14PM +0200, Henriksen, Jonas F wrote:
I'm writing some simple triggers and functions for a postgres
database, and I'm wondering how to go about to debug a
pl/pgSQL-script. Is there a way to echo variable-content to screen, or
to file? Or is there other, more advanced ways of debugging such
scripts?


Yes, use RAISE NOTICE. See the docs -- it takes a string which can have
% in them, like printf %-escapes but without the modifiers.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Postgres is bloatware by design: it was built to house
PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.