1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Add +(pg_lsn,numeric) and -(pg_lsn,numeric) operators.

By using these operators, the number of bytes can be added into and
subtracted from LSN.

Bump catalog version.

Author: Fujii Masao
Reviewed-by: Kyotaro Horiguchi, Michael Paquier, Asif Rehman
Discussion: https://postgr.es/m/ed9f7f74-e996-67f8-554a-52ebd3779b3b@oss.nttdata.com
This commit is contained in:
Fujii Masao
2020-06-30 23:55:07 +09:00
parent 324435eb14
commit 9bae7e4cde
10 changed files with 296 additions and 2 deletions

View File

@ -4801,7 +4801,13 @@ SELECT * FROM pg_attribute
standard comparison operators, like <literal>=</literal> and
<literal>&gt;</literal>. Two LSNs can be subtracted using the
<literal>-</literal> operator; the result is the number of bytes separating
those write-ahead log locations.
those write-ahead log locations. Also the number of bytes can be
added into and subtracted from LSN using the
<literal>+(pg_lsn,numeric)</literal> and
<literal>-(pg_lsn,numeric)</literal> operators, respectively. Note that
the calculated LSN should be in the range of <type>pg_lsn</type> type,
i.e., between <literal>0/0</literal> and
<literal>FFFFFFFF/FFFFFFFF</literal>.
</para>
</sect1>