Hello, I need a long text form from a file in my plpgsql variable. Can anyone think of a more straightforward way to read the file than the following:
CREATE FUNCTION test() RETURNS void AS $BODY$ DECLARE mytxt text; BEGIN CREATE TEMP TABLE x (x text); COPY x from '/path/to/myfile.txt'; mytxt := (SELECT x from x); ... END; $BODY$ LANGUAGE 'plpgsql' VOLATILE; Regards Erwin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general