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

From Alvaro Herrera
Subject Re: Printing bitmap objects in the debugger
Date
Msg-id 20160914145137.GA462997@alvherre.pgsql
Whole thread Raw
In response to Printing bitmap objects in the debugger  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: Printing bitmap objects in the debugger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Ashutosh Bapat wrote:
> 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.

I don't understand.  Why don't you just use "call pprint(the bitmapset)"
in the debugger?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Surprising behaviour of \set AUTOCOMMIT ON
Next
From: Tom Lane
Date:
Subject: Re: Printing bitmap objects in the debugger