mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-23 06:50:45 +02:00
After more discussion, the new function added by ddbd5d8
could have been
designed in a better way. Based on an idea from Álvaro, instead of
returning one column which includes both the raw and combined flags, use
two columns, with one for the raw flags and one for the combined flags.
This also takes care of some issues with HEAP_LOCKED_UPGRADED and
HEAP_XMAX_IS_LOCKED_ONLY which are not really combined flags as they
depend on conditions defined by other raw bits, as mentioned by Amit.
While on it, fix an extra issue with combined flags. A combined flag
was returned if at least one of its bits was set, but all its bits need
to be set to include it in the result.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Amit Kapila
Discussion: https://postgr.es/m/20190913114950.GA3824@alvherre.pgsql
17 lines
505 B
SQL
17 lines
505 B
SQL
/* contrib/pageinspect/pageinspect--1.7--1.8.sql */
|
|
|
|
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
|
|
\echo Use "ALTER EXTENSION pageinspect UPDATE TO '1.8'" to load this file. \quit
|
|
|
|
--
|
|
-- heap_tuple_infomask_flags()
|
|
--
|
|
CREATE FUNCTION heap_tuple_infomask_flags(
|
|
t_infomask integer,
|
|
t_infomask2 integer,
|
|
raw_flags OUT text[],
|
|
combined_flags OUT text[])
|
|
RETURNS record
|
|
AS 'MODULE_PATHNAME', 'heap_tuple_infomask_flags'
|
|
LANGUAGE C STRICT PARALLEL SAFE;
|