Re: debugging tools inside postgres

From: HuangQi <huangqiyx(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: debugging tools inside postgres
Date: 2011-06-24 15:27:52
Message-ID: BANLkTi=Gj9c2BU62usG5G8sv9tNqxvuSvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24 June 2011 23:21, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> writes:
> > (2011/06/24 15:35), HuangQi wrote:
> >> I'm trying to debug a modification for the query planner. But I found it
> >> seems the data structure of my planned query is incorrect. I was trying
> to
> >> print out the data structure by use the "p" command in gdb which is
> quite
> >> inconvenient and takes time. May I know is there any embedded function
> in
> >> postgres to print out the node data structures, or any other plan
> related
> >> data structures? Thanks.
>
> > I think nodeToString() would help.
>
> For interactive use in gdb, I generally do
>
> call pprint(..node pointer..)
>
> which prints to the postmaster log.
>
> regards, tom lane
>

Thanks, Tom, this call pprint() works very nice.
--
Best Regards
Huang Qi Victor

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-24 16:06:17 Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
Previous Message Tom Lane 2011-06-24 15:21:53 Re: debugging tools inside postgres