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

2011-03-20 Thread hom
2011/3/20 Nicolas Barbier : > 2011/3/20 hom : > >> I trace into scan.c because I want to known how the paser tree is >> built and I debug the source step by step. > > I suggest you learn how flex/bison work first. The contents of the *.c > files generated by flex/bison are not generally supposed to

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

2011-03-20 Thread hom
2011/3/20 Martijn van Oosterhout : > On Sun, Mar 20, 2011 at 11:50:01AM +0800, hom wrote: >> I trace into scan.c because I want to known how the paser tree is >> built and I debug the source step by step. >> Then the eclipse pick up the scan.I and the excute order does not >> match the code. > > Um

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

2011-03-20 Thread Nicolas Barbier
2011/3/20 hom : > I trace into scan.c because I want to known how the paser tree is > built and I debug the source step by step. I suggest you learn how flex/bison work first. The contents of the *.c files generated by flex/bison are not generally supposed to be interpreted by humans, rather you

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

2011-03-20 Thread Martijn van Oosterhout
On Sun, Mar 20, 2011 at 11:50:01AM +0800, hom wrote: > I trace into scan.c because I want to known how the paser tree is > built and I debug the source step by step. > Then the eclipse pick up the scan.I and the excute order does not > match the code. Umm, the scanners produced by flex and bison a

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

2011-03-19 Thread hom
2011/3/19 Vaibhav Kaushal : > 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 (it

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

2011-03-18 Thread Vaibhav Kaushal
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

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

2011-03-18 Thread hom
2011/3/18 Vaibhav Kaushal : > 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

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

2011-03-18 Thread hom
2011/3/18 Brendan Jurd : > On 18 March 2011 01:57, hom wrote: >>  I try to known how a database is implemented > > This objective is so vast and so vague that it's difficult to give > meaningful help. > > I'd emphasise Kevin Grittner's very worthwhile advice.  Try to break > your question down int

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

2011-03-18 Thread hom
2011/3/18 Markus Wanner : > Hom, > > On 03/17/2011 04:49 PM, Kevin Grittner wrote: >> That's ambitious. > > Absolutely, yes.  Exercise patience with yourself. > > A method that hasn't been mentioned, yet, is digging out your debugger > and attach it to a connected Postgres backend.  You can then is

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

2011-03-18 Thread hom
2011/3/17 Kevin Grittner : > hom wrote: > >> I try to known how a database is implemented and I have been >> reading PG source codes for a month. > > That's ambitious. > > find -name '*.h' -or -name '*.c' \ >  | egrep -v '^\./src/test/.+/tmp_check/' \ >  | xargs cat | wc -l > 1059144 > > Depending

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

2011-03-18 Thread hom
2011/3/17 Bruce Momjian : > hom wrote: >> Hi, >> >>   I try to known how a database is implemented and I have been reading >> PG source codes for a month. >> >> Now, I only know a little about how PG work.  :( >> >> I just know PG work like this but I don't know why PG work like this.  :(  :( >> >>

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

2011-03-18 Thread Vaibhav Kaushal
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 t

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

2011-03-18 Thread Brendan Jurd
On 18 March 2011 01:57, hom wrote: >  I try to known how a database is implemented This objective is so vast and so vague that it's difficult to give meaningful help. I'd emphasise Kevin Grittner's very worthwhile advice. Try to break your question down into smaller, more specific ones. With a

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

2011-03-18 Thread Markus Wanner
Hom, On 03/17/2011 04:49 PM, Kevin Grittner wrote: > That's ambitious. Absolutely, yes. Exercise patience with yourself. A method that hasn't been mentioned, yet, is digging out your debugger and attach it to a connected Postgres backend. You can then issue a query you are interested in and fo

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

2011-03-17 Thread Kevin Grittner
hom wrote: > I try to known how a database is implemented and I have been > reading PG source codes for a month. That's ambitious. find -name '*.h' -or -name '*.c' \ | egrep -v '^\./src/test/.+/tmp_check/' \ | xargs cat | wc -l 1059144 Depending on how you do the math, that's about 50,

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

2011-03-17 Thread Bruce Momjian
hom wrote: > Hi, > > I try to known how a database is implemented and I have been reading > PG source codes for a month. > > Now, I only know a little about how PG work. :( > > I just know PG work like this but I don't know why PG work like this. :( :( > > even worse, I feel I can better u

[HACKERS] I am confused after reading codes of PostgreSQL three week

2011-03-17 Thread hom
Hi, I try to known how a database is implemented and I have been reading PG source codes for a month. Now, I only know a little about how PG work. :( I just know PG work like this but I don't know why PG work like this. :( :( even worse, I feel I can better understand the source code. it m