Print to console as SQL executes
The only way I have found is through a stored procedure

CREATE OR REPLACE FUNCTION print_notice(msg text) 
  RETURNS integer AS 
$$ 
DECLARE 
BEGIN 
    RAISE NOTICE USING MESSAGE = msg;
    RETURN null;
END; 
$$ 
LANGUAGE 'plpgsql' IMMUTABLE; 


So, executing SELECT print_notice('Foo ' || someText || ' !');

Will produce (for example) :

NOTICE:  Foo whatever !
query result with 1 row discarded.


I'm not sure if this can be done without the SELECT and the query ... row discarded message. But it works.