在postgresql中打印一个variables的值

我有一个postgresql函数

CREATE OR REPLACE FUNCTION fixMissingFiles() RETURNS VOID AS $$ DECLARE deletedContactId integer; BEGIN SELECT INTO deletedContactId contact_id FROM myContacts WHERE id=206351; -- print the value of deletedContactId variable to the console END; $$ LANGUAGE plpgsql; 

如何将deletedContactId的值打印到控制台?

发出通知:

 raise notice 'Value: %', deletedContactId; 

http://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html