PostgreSQL extension to read file in binary format.
This project has been compiled successfully in Linux against PostgreSQL version 11.
$ make clean
$ make
$ make install
On successful compilation, install this extension in PostgreSQL environment.
$ create extension pgreadfile
Let us read a file.
$ select pgreadfile('/tmp/myfile.dat');
The output is binary data in bytea.