From: | HuangQi <huangqiyx(at)gmail(dot)com> |
---|---|
To: | Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: debugging tools inside postgres |
Date: | 2011-06-24 10:14:52 |
Message-ID: | BANLkTimMtJ6QkUTBfk3omjDiMC0mZTb78w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/6/24 Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
> (2011/06/24 15:35), HuangQi wrote:
> > Hi,
> > 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. This function converts node tree
> recursively into a string, and it's applicable for any Node-derived
> object, such as Expr, Var and Const.
>
> ex)
> elog(DEBUG1, "%s", nodeToString(plan));
>
> Regards,
> --
> Shigeru Hanada
>
Hi,
I don't know why but when I am debugging the query evaluation, the elog
function can not output to shell.
--
Best Regards
Huang Qi Victor
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2011-06-24 11:01:57 | silent_mode and LINUX_OOM_ADJ |
Previous Message | Alexander Korotkov | 2011-06-24 09:59:16 | Re: WIP: Fast GiST index build |