I'm trying to write out query results to a text file from within a plpgsql function, but having trouble. Can anyone tell me if this is possible? I'm trying to perform \o filename, then select, but it squawks about no destination for the select results. Any pointers? -Meghan