Hello > > Do you not think it would be really amazingly useful? After all, in C, the > single most useful debugging tool is "fprintf(stderr,...)", and yet > postgresql doesn't have an equivalent that can operate on the most common > data format. [I'm stretching the analogy a bit here, but it seems to me that > a multi-row table is to postgresql as int is to C.]
it's nonsense - PL/pgSQL is procedural language - so there are same - similar types like C > > There are a lot of people who would benefit from it, most of whom (including > me) don't really have the expertise to do it well. > I don't think so we need a special enhancing of RAISE statement. What is a problem on lines FOR r IN SELECT ... LOOP RAISE NOTICE r; END LOOP; ??? > Also, there is a lot of value in being able to debug as needed with a 1-line > debugging statement, then get back to the problem at hand, rather than > having to break out of the current programming task to write a debug > function :-) > CREATE OR REPLACE FUNCTION debug_query(text) RETURNS void AS $$ DECLARE r record; BEGIN FOR r IN EXECUTE $1 LOOP RAISE NOTICE r; END; END; $$ LANGUAGE plpgsql; Regards Pavel Stehule > Thanks very much, > > Richard > > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs