So, two questions: 1. Is there a better way of getting arbitrary columns from a record?
Not really.
2. If not, will I run into problems with the name of the temporary table if two processes call this function at the same time, or are temp names unique to the particular session?
Temporary tables are session-specific.
Really, you'd be better off using one of the more interpreted languages for this specific task though.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx