Returns all or part of a text file, starting at the given byte offset, returning at most length bytes (less if the end of file is reached first).
Signatures & examples
pg_read_file ( filename text [, offset bigint, length bigint ] [, missing_ok boolean ] ) → text
Returns all or part of a text file, starting at the given byte offset, returning at most length bytes (less if the end of file is reached first). If offset is negative, it is relative to the end of the file. If offset and length are omitted, the entire file is returned. The bytes read from the file are interpreted as a string in the database's encoding; an error is thrown if they are not valid in that encoding.Version history 5