Printing bitmap objects in the debugger - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Printing bitmap objects in the debugger
Date
Msg-id CAFjFpRdiht8e1HTVirbubr4YzaON5iZTzFJjq909y4sU8M_6eA@mail.gmail.com
Whole thread Raw
Responses Re: Printing bitmap objects in the debugger  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Re: Printing bitmap objects in the debugger  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Printing bitmap objects in the debugger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi All,
While working on partition-wise join, I had to examine Relids objects
many times. Printing the Bitmapset::words[] in binary format and then
inferring the relids takes time and is error prone. Instead I wrote a
function bms_to_char() which allocates a StringInfo, calls
outBitmapset() to decode Bitmapset as a set of integers and returns
the string. In order to examine a Relids object all one has to do is
execute 'p bms_to_char(bms_object) under gdb.

Is there a way, this can be included in the code? If it's available in
the code, developers don't have to apply the patch and compile it for
debugging.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachment

pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: Vacuum: allow usage of more than 1GB of work mem
Next
From: Julien Rouhaud
Date:
Subject: Re: [PATCH] SortSupport for macaddr type