I'm using PostgreSQL And I want to print a message to the console.
If I use plpythonu I use plpy.notice
If I use plpgsql I use raise notice
but how do I print when the function is pure SQL?
using SELECT 'string' isn't helping me as it print the string in a column and if the message is located in the middle of the code it doesn't show it.
I want something like raise notice / plpy.notice for SQL.
CREATE OR REPLACE FUNCTION A()
RETURNS VOID AS
$BODY$
how do i print 'hello world' here?
$BODY$
LANGUAGE sql VOLATILE
if it was a plpgsql I would do:
CREATE OR REPLACE FUNCTION A()
RETURNS VOID AS
$BODY$
Raise Notice 'hello world'
$BODY$
LANGUAGE plpgsql VOLATILE
I'm looking for the equivalent in LANGUAGE SQL
raisein plain SQL – Jul 07 '15 at 06:09SELECT 'hello world'? Other than that, I used a solution for something else here: http://dba.stackexchange.com/a/24850/6219 – András Váczi Jul 07 '15 at 08:26