In postgresql and bash(linux), are there ways to directly import a file from the filesystem like
[execute.sh]
pgsql .... -f insert.txt
[insert.txt]
insert into table(id,file) values(1,import('/path/to/file'))
There seems to be no import function, bytea_import as well, lo_import would save int and i dont know how to get the file back (these files are in small sizes so using lo_import seems not appropriate)
And can how do i move the insert.txt statement to pgl? Thanks