postgresql/src
Andres Freund df6949ccf7 Add tid_block() and tid_offset() accessor functions
The two new functions allow to extract the block number and offset from a tid.

There are existing ways to do so (e.g. by doing (ctid::text::point)[0]), but
they are hard to remember and not pretty.

tid_block() returns int8 (bigint) because BlockNumber is uint32, which exceeds
the range of int4. tid_offset() returns int4 (integer) because OffsetNumber is
uint16, which fits safely in int4.

Bumps catversion.

Author: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://postgr.es/m/CAJTYsWUzok2+mvSYkbVUwq_SWWg-GdHqCuYumN82AU97SjwjCA@mail.gmail.com
2026-04-05 15:17:05 -04:00
..
backend Add tid_block() and tid_offset() accessor functions 2026-04-05 15:17:05 -04:00
bin Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
common Make implementation of SASLprep compliant for ASCII characters 2026-03-24 08:29:23 +09:00
fe_utils Harden astreamer tar parsing logic against archives it can't handle. 2026-04-02 12:20:36 -04:00
include Add tid_block() and tid_offset() accessor functions 2026-04-05 15:17:05 -04:00
interfaces libpq: Allow developers to reimplement libpq-oauth 2026-03-31 11:47:26 -07:00
makefiles meson: Add {perl|python}_includespec to generated Makefile.global 2026-03-18 11:09:14 +01:00
pl Avoid including vacuum.h in tableam.h and heapam.h. 2026-03-31 12:43:52 -05:00
port Fix unused function warning on Arm platforms 2026-04-05 08:49:47 +07:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Add tid_block() and tid_offset() accessor functions 2026-04-05 15:17:05 -04:00
timezone Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
tools Add infrastructure for pg_get_*_ddl functions 2026-04-05 10:54:54 -04:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Update Unicode data to Unicode 17.0.0 2026-03-20 08:42:50 +01:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00