@@ -14489,19 +14489,21 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1448914489 at the given <parameter>offset</>, returning at most <parameter>length</>
1449014490 bytes (less if the end of file is reached first). If <parameter>offset</>
1449114491 is negative, it is relative to the end of the file.
14492- When <parameter>offset</> and <parameter>length</> parameters are omitted,
14493- it returns the whole of the file.
14494- The part of a file must be a valid text in the server encoding.
14492+ If <parameter>offset</> and <parameter>length</> are omitted, the entire
14493+ file is returned. The bytes read from the file are interpreted as a string
14494+ in the server encoding; an error is thrown if they are not valid in that
14495+ encoding.
1449514496 </para>
1449614497
1449714498 <indexterm>
1449814499 <primary>pg_read_binary_file</primary>
1449914500 </indexterm>
1450014501 <para>
14501- <function>pg_read_binary_file</> returns part of a file as like as
14502- <function>pg_read_file</>, but the result is a bytea value.
14503- One of the usages is to read a file in the specified encoding combined with
14504- <function>convert_from</> function:
14502+ <function>pg_read_binary_file</> is similar to
14503+ <function>pg_read_file</>, except that the result is a bytea value;
14504+ accordingly, no encoding checks are performed.
14505+ In combination with the <function>convert_from</> function, this function
14506+ can be used to read a file in a specified encoding:
1450514507<programlisting>
1450614508SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8');
1450714509</programlisting>
0 commit comments