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

Re: look up tables while parsing queries

From: andrew <andrew(dot)ylzhou(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: look up tables while parsing queries
Date: 2006-02-06 09:24:26
Message-ID: 29d3b0b90602060124u62ef5c85p3176b5435a1d4f66@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 2/5/06, Neil Conway <neilc(at)samurai(dot)com> wrote:
> If you're referring to the raw parser (parser/gram.y), you should not
> attempt to access any tables. For one thing, the raw parser might be
> invoked outside a transaction. The statement might also refer to a table
> created earlier in the same query string, which would mean the
> referenced table would not exist when the latter part of the query
> string is parsed.
>
> Instead, database access should be done in the analysis phase -- see
> transformStmt() in parser/analyze.c and friends. There are plenty of
> examples in the code of how to access tables, which should be a helpful
> guide.
>
> -Neil

It is not in the raw parser. I meant inside the transformStmt(). What
is "friends"? Could  you possibly point out at least one place that
illustrates how to access  tables?

Thanks.

--
andrew

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2006-02-06 09:58:43
Subject: slow information schema with thausand users, seq.scan pg_authid
Previous:From: Mark WoodwardDate: 2006-02-06 05:17:27
Subject: Re: Shared memory and memory context question

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