Brian Hirt <bhirt(at)mobygames(dot)com> writes:
> Anyway, each query executes by itself, but if i execute both queries in
> the same session (order doesn't matter), the back end crashes. Maybe it
> has to do with temp tables?
I'm betting this is the same bug previously recognized in
LocalBufferAlloc:
http://fts.postgresql.org/db/mw/msg.html?mid=1361296
regards, tom lane