Craig Ringer <ringerc@xxxxxxxxxxxxx> writes: > I didn't find a reasonable way to simply fetch a cursor into a (possibly > temporary) table, like: > INSERT INTO sometable FETCH ALL FROM somecursor; Why would you bother with a cursor, and not just INSERT ... SELECT using the original query? Putting a cursor in between will just make matters more complicated and slower. (For one thing, the plan created for a cursor is optimized for incremental fetching not read-it-all-at-once.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general