"Simon Riggs" <[EMAIL PROTECTED]> 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));

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to