Re: Distinguish view and table problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "suzhiyang" <suzhiyang(at)gmail(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Distinguish view and table problem
Date: 2009-12-18 17:45:11
Message-ID: 8218.1261158311@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"suzhiyang" <suzhiyang(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-12-18 17:49:04 Re: Time to run initdb is mostly figure-out-the-timezone work
Previous Message Joshua Tolley 2009-12-18 17:34:15 Re: Time to run initdb is mostly figure-out-the-timezone work