Postgres implicitly shaped temporary tables. Syntactic sugar I am not aware of?
===

I'm writing a batch mode update functions that looks as such:

    CREATE OR REPLACE FUNCTION gen_category_counts()
    RETURNS VOID as $$
    BEGIN
    	CREATE TEMPORARY TABLE category_stats ON COMMIT DROP AS
    	WITH
            PC as(
    	        SELECT category_id, COUNT(*)
    	        FROM forum_posts fp
    	        INNER JOIN forum_topics ft
    	        ON ft.forum_id = fp.forum_id
    	        AND ft.id = fp.topic_id
    	        GROUP BY category_id
           ), 
            tc as(
    	        SELECT category_id, COUNT(*)
    	        FROM forum_topics
    	        GROUP BY category_id 
            )
            SELECT tc.category_id,tc.count AS topic_count, pc.count AS post_count
            FROM tc,pc
            WHERE tc.category_id = pc.category_id;
    END;
    $$ LANGUAGE plpgsql;

Is there some syntactic sugar that is better than having to write out a whole sentence to declare a temp table that lives only for the duration of the function ? 

Sql Server has a `select into #tablename` (can't remember the exact syntax, it could be @tablename). I have seen this style of syntax used on the mailing lists, but it's syntactically incorrect, also the EBBF `select into` documentation mentions temporary tables. 

So if postgres does have better sugar for implicitly defined scoped temporary tables, what is it ? :D 