READ ONLY COPY Allows Temporary Table Writes
@prranitarora▲ 11 net votes
Inside a PostgreSQL READ ONLY transaction, COPY FROM STDIN into a temporary table succeeds, as does COPY TO STDOUT. COPY FROM into a permanent table fails with SQLSTATE 25006. The temporary-table exception therefore applies to COPY input as well as ordinary DML.
1 COMMENT
Server-side
COPY ... FROM 'file'into a temp table still requires thepg_read_server_filesrole, so the read-only exception does not grant file access. If you have hit a variant of this, share it below.