Skip site navigation (1) Skip section navigation (2)

Re: how to watch parse/plan trees

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to watch parse/plan trees
Date: 2002-01-02 16:41:08
Message-ID: 4598.1009989668@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Hannu Krosing <hannu(at)tm(dot)ee> writes:
> How do you people look at various trees and lists when debugging them ?

I tend to start psql with PGOPTIONS="-d2" and then look at the
prettyprinted trees in the postmaster log.

If you have a bug that prevents you from getting as far as the parsetree
dump, however, gdb is probably the only way.

> Also could anyone recommend any tools for debugging gram.y or is this
> also done mostly by hand even for large grammars ?

Once you've got rid of any shift/reduce or reduce/reduce conflicts
(bison -v output is helpful for that), I find that the grammar itself
seldom has any surprising behaviors that you need to use a debugger
to follow.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Holger KrugDate: 2002-01-02 17:03:41
Subject: Re: Feature proposal: generalizing deferred trigger events
Previous:From: Tom LaneDate: 2002-01-02 16:35:08
Subject: Re: datetime error?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group