Re: I am confused after reading codes of PostgreSQL three week

From: Vaibhav Kaushal <vaibhavkaushal123(at)gmail(dot)com>
To: hom <obsidianhom(at)gmail(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: I am confused after reading codes of PostgreSQL three week
Date: 2011-03-19 03:31:27
Message-ID: 1300505487.2813.10.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hom,

Frankly I am a learner as well. The experts here are almost always ready
to help and would be a better source of information.

Moreover I am also using eclipse but I do not use it for building the
source. I use it only as a source code browser (its easy in GUI; isn't
it? ). I am trying to learn about the executor so can't say much about
the parser. However I suppose that you must be knowing the rules of the
tools flex and bison to understand the parser. And why are you into
scan.c? It is created by flex dear. Read the scan.l and gram.y instead.
It is these files which are responsible for the major work done by the
parser.

If you are keen about the parser, go learn lex and yacc (or flex and
bison ... they are almost the same) and then go through the scan.l and
gram.y files. It is actually an _extremely_ tough job to read the
generated files. Once again, do turn off the "Search for duplicate
source files" option. There are no duplicate files in the source tree.

Also, if you are using the copy of source tree which was built once in
the workspace, things can be a little different.

@others: Well, I do know that there are a few books in the market
written by the devs but how much does it help when I am already banging
my head into source since last 5 months?

Regards,
Vaibhav

On Fri, 2011-03-18 at 22:44 +0800, hom wrote:
> 2011/3/18 Vaibhav Kaushal <vaibhavkaushal123(at)gmail(dot)com>:
> > Hi,
> > That was the question I was facing 5 months ago and trust me I am doing it
> > even now. With an average of 6+ hours going into PostgreSQL Code, even with
> > best practices (as suggested by the developers) I still think I know less
> > than 10 percent. It is too huge to be swallowed at once.
> > I too had to break it down into pieces and because everything is so
> > interconnected with everything else, it is quite complicated in the
> > beginning. Start with one piece; planner, parser, executor, storage
> > management whatever and slowly it should help you get the bigger picture.
> > regards,
> > Vaibhav
> > I had to break it into
>
> Thanks Vaibhav .
> I have step into parser before but I meet a problem:
>
> when I debug step in the scanner_init(), Eclipse always finds scan.l
> and the excute order is not match the file.
> I think it should be scan.c actually but I don't known how to trace
> into scan.c :(
> PS: I have turn "Search for duplicate source files" option on.
>
> I have posted to the mail list, but it have not solved.
>
> here is the link:
> http://postgresql.1045698.n5.nabble.com/Open-unmatch-source-file-when-step-into-parse-analyze-in-Eclipse-td3408033.html
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-03-19 04:10:58 tolower() identifier downcasing versus multibyte encodings
Previous Message Nikhil Sontakke 2011-03-19 03:25:36 VACUUM FULL deadlock with backend startup