Re: pg_views - Mailing list pgsql-sql

From Christoph Haller
Subject Re: pg_views
Date
Msg-id 3E3F8192.376AA9CB@rodos.fzk.de
Whole thread Raw
In response to pg_views  (Lex Berezhny <LBerezhny@DevIS.com>)
List pgsql-sql
>
>   I'm wondering if PostgreSQL actually reparses the view definition on

> each invocation or if it stores the required information in some
> accessible place.
>

The documentation says:
Whenever a query against a view (i.e. a virtual table) is made, the
rewrite system rewrites the user's query to a query that   accesses the base tables given in the view definition
instead.

>
>   My goal is to take a view name as input and output the tables and
> columns composing the view.
>

I very much doubt this is possible, unless you step deep into
the parser defined in gram.y and scan.l, which is
as you mentioned beyond your scope.

Regars, Christoph




pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: iceberg queries
Next
From: Bruce Momjian
Date:
Subject: Re: SQL99/SQL92 Grammar