Jeff Ross <jross@xxxxxxxxxx> writes: > Now I'm *really* confused. I thought the table structure I created at > the beginning of the function was where the results would be returned > to. Uh, you're using that as the destination for the FOR loop's SELECT. What exactly is the purpose of having a second SELECT within the loop? 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