Re: Doubt in parser

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Dhanaraj <Dhanaraj(dot)M(at)Sun(dot)COM>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doubt in parser
Date: 2006-02-16 12:45:56
Message-ID: 20060216124556.GD26127@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 16, 2006 at 06:07:25PM +0530, Dhanaraj wrote:
> hi
>
> currently i looking at the postgres src code. I saw the scanner and
> parser implemetations at two different places (src/backend/parser/ and
> /src/bakend/bootstrp). Can anybody tell me the purpose of having two
> phases?? or will this help to parse the queries at different levels?

The first one is the actual parser for queries you send. The latter is
the bootstrap parser which is only used during the inital bootstrap of
a database. It needs to be seperate because of things like the names of
columns are stored in a pg_attribute, yet how can you fill the table if
you don't know what the columns are called.

The latter is basically a glorified data loader to handle this special
case. It can't do queries or anything like that. You can basically
ignore it for normal development.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-16 12:49:18 Re: qsort again
Previous Message Dhanaraj 2006-02-16 12:37:25 Doubt in parser