* DimitryASuplatov: > I`ve also worked out how to do this simply from bash > > ./bin/psql mypdb <<EOF > insert into pdb values ('`cat /file/name`'); > EOF This doesn't work if the file contains embedded "'" characters (and backslashes and NULs are also problematic). You will also get errors if the file encoding does not match the database encoding. You probably should use a BYTEA column and a little Perl script which uses bind_param to specify a type of PG_BYTEA for the parameter. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general