This seems to not be possible is plpgsql:
SELECT DISTINCT A.x INTO TEMP X FROM A,B WHERE A.x=B.x;
Is there some way to create a temporary table in plpgsql?
-- Itai Zukerman <http://www.math-hat.com/~zukerman/>