Benedict Holland <benedict.m.holland@xxxxxxxxx> writes: > Thanks for the response. The PG version is 9.0. I can't really give you the > text of the function unfortunately. I know though that there isn't any > aliasing issues occurring. After commenting out all but one line, I have it > down to, not a insert select but a > create temp table t1(id, ...) as > select (a few columns with names that don't match) > where etc. Hm. A CREATE TABLE AS SELECT case works for me in 9.0.8. Perhaps you could sanitize what you've got into a small self-contained test case? 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