Jan Wieck <[EMAIL PROTECTED]> writes:
> Lex Berezhny wrote:
>> My goal is to take a view name as input and output the tables and
>> columns composing the view.
> Don't forget that a view's columns can contain complex expressions
> instead of simple table.column references.
Yes. This problem is n
Lex Berezhny wrote:
>
> hi,
>
> I'm trying to write some code that can analyze the database structure
> and i need a way to discover the composition of a view (the tables and
> table.column info).
>
> I've managed to do much of this by querying the pg_views for the
> definition and literally
>
> 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
hi,
I'm trying to write some code that can analyze the database structure
and i need a way to discover the composition of a view (the tables and
table.column info).
I've managed to do much of this by querying the pg_views for the
definition and literally parsing the SQL myself, but obviously