The php Function pg_Options
pg_options provides functions that manage PostgreSQL options. The table below lists the functions and their parameters.
Most of the functions below accept an argument representing a query. Some of them return information about the query (for example, the parse error message) while others return a string representing the query. Most of the arguments to these functions are lower-case, except for table and index names which are usually written in single quotes.
The function pg_relation_filenode accepts the OID or name of a table, index, sequence, or toast table and returns the "filenode" number currently assigned to it. This is the base component of the file name(s) used to store the relation (see Section 59.1 for details). This function is required when creating a database object with storage other than in the default system catalog.
This function displays the current transaction log insertion point, similar to the replication protocol command pg_current_xlog_insert_location(). It is useful for archiving and debugging transaction log files.
pg_unescape_bytea() unescapes bytea data values, which may be binary data, returned by SELECT with the bytea type. Note that the raw bytea data is not in octal format, so it will probably need to be converted back to octal by the user.
pg_read_file() reads a text file from the specified offset and length, returning at most length bytes. The file is interpreted as a string in the server's encoding, and an error is thrown if any octal characters are read in the wrong encoding.