input.sql

application/octet-stream

-- First run CREATE EXTENSION file_fdw;
-- Then fix hardcoded path to dummy_passwd file.

BEGIN;

CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw;
CREATE FOREIGN TABLE passwd (username text, pass text, uid int8, gid int8, gecos text, home text, shell text) SERVER file_server OPTIONS (format 'text', filename '/path/to/dummy_passwd', delimiter ':', null '');

SELECT * FROM passwd WHERE uid > 4;

ROLLBACK;