I have a CSV file that can be loaded into a table easily with COPY FROM, but the catch is that the file is stored in the database in a bytea field.
Is the only way to use COPY on this data to write it out to a temporary file, or is there some clever trick, perhaps involving COPY FROM STDIN?