Re: Heap page diagnostic/test functions (WIP) - Mailing list pgsql-patches

From Gregory Stark
Subject Re: Heap page diagnostic/test functions (WIP)
Date
Msg-id 87abyqbfdr.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Heap page diagnostic/test functions (WIP)  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Heap page diagnostic/test functions (WIP)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Simon Riggs" <simon@2ndquadrant.com> writes:

> I'll return the infomasks directly, for you to manipulate.
>
> Not happy with that, but open to suggestions.

Well the alternative would be a long list of boolean columns which would make
the output kind of long.

Perhaps a function pg_decode_infomask(varbit) which returns a ROW of booleans
with appropriate names would be a good compromise. If you want it you could
use it in your query.

Or perhaps you could include a ROW of booleans in your output already,
something like:

postgres=# insert into tuple_info values (b'000', ROW(false,false,false));
INSERT 0 1

postgres=# select * from tuple_info;
 infomask_bits | infomask_flags
---------------+----------------
 000           | (f,f,f)
(1 row)

postgres=# select (infomask_flags).* from tuple_info;
 flag_a | flag_b | flag_c
--------+--------+--------
 f      | f      | f
(1 row)

That might be kind of tricky to cons up though. I had to create a table to do
it here.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Heap page diagnostic/test functions (WIP)
Next
From: Tom Lane
Date:
Subject: Re: Heap page diagnostic/test functions (WIP)