diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-02-19 08:35:23 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-02-19 08:35:23 -0500 |
commit | 7d03a83f4d0736ba869fa6f93973f7623a27038a (patch) | |
tree | d1d7f36c742fcea38edbbf7eb623cca2a52c1378 /doc/src | |
parent | a222f7fda6a04ab8ec655cd5a9de5ff70ff916c3 (diff) | |
download | postgresql-7d03a83f4d0736ba869fa6f93973f7623a27038a.tar.gz postgresql-7d03a83f4d0736ba869fa6f93973f7623a27038a.zip |
Add a pg_lsn data type, to represent an LSN.
Robert Haas and Michael Paquier
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/datatype.sgml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 30fd9bb598d..00ccbe1bb5f 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -181,6 +181,12 @@ </row> <row> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry><productname>PostgreSQL</productname> Log Sequence Number</entry> + </row> + + <row> <entry><type>point</type></entry> <entry></entry> <entry>geometric point on a plane</entry> @@ -4504,6 +4510,32 @@ SELECT * FROM pg_attribute </para> </sect1> + <sect1 id="datatype-pg-lsn"> + <title><acronym>pg_lsn Type</acronym></title> + + <indexterm zone="datatype-pg-lsn"> + <primary>pg_lsn</primary> + </indexterm> + + <para> + The <type>pg_lsn</type> data type can be used to store LSN (Log Sequence + Number) data which is a pointer to a location in the XLOG. This type is a + representation of XLogRecPtr and an internal system type of + <productname>PostgreSQL</productname>. + </para> + + <para> + Internally, an LSN is a 64-bit integer, representing a byte position in + the write-ahead log stream. It is printed as two hexadecimal numbers of + up to 8 digits each, separated by a slash; for example, + <literal>16/B374D848</>. The <type>pg_lsn</type> type supports the + standard comparison operators, like <literal>=</literal> and + <literal>></literal>. Two LSNs can be subtracted using the + <literal>-</literal> operator; the result is the number of bytes separating + those write-ahead log positions. + </para> + </sect1> + <sect1 id="datatype-pseudo"> <title>Pseudo-Types</title> |