Paul McGarry <PaulM(at)opentec(dot)com(dot)au> writes:
> Can I avoid having the temp table written to disk
Not at present --- temp tables are not different from real tables,
except for some naming shenanigans. So creation of a temp table will
involve some disk hits.
Do you really *need* a temp table, as opposed to writing a
sub-SELECT-in-the-FROM-clause? ISTM that that feature takes care
of most of the simple notational reasons for wanting a temp table.
regards, tom lane