Copyright | (c) James King 2020 2021 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Database.PostgreSQL.Replicant.Types.Lsn
Description
Log Sequence Number or LSN is a pointer to a place inside of a WAL log file. It contains the file name and an offset in bytes encoded in two parts.
LSNs can be serialized into 64-bit big-endian numbers in the binary protocol but are also represented textually in query results and other places.
This module follows a similar convention to many containers libraries and should probably be imported qualified to avoid name clashes if needed.
See: https://www.postgresql.org/docs/10/datatype-pg-lsn.html
Documentation
fromByteString :: ByteString -> Either String LSN Source #
toByteString :: LSN -> ByteString Source #
Note that as of bytestring ~0.10.12.0 we don't have upper-case hex encoders but the patch to add them has been merged and when available we should switch to them