"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