Re: Distinguish view and table problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Distinguish view and table problem
Date
Msg-id 8218.1261158311@sss.pgh.pa.us
Whole thread Raw
In response to Distinguish view and table problem  ("suzhiyang" <suzhiyang@gmail.com>)
List pgsql-hackers
"suzhiyang" <suzhiyang@gmail.com> writes:
> I just want to distinguish a view and a table while postgres execute
> exec_simple_query(). In the systable of pg_class, a view and a table
> has different relkind ('r' 'v'). But when I print the parsetree and
> the rewrite parsetree, I found that a view and a table has no
> character to distinguish because the structure Relation has no
> attribute called relkind.

See rel->rd_rel->relkind ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joshua Tolley
Date:
Subject: Re: Time to run initdb is mostly figure-out-the-timezone work
Next
From: Alvaro Herrera
Date:
Subject: Re: Time to run initdb is mostly figure-out-the-timezone work