Re: Display View Columns and Their Source Tables and Columns - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Display View Columns and Their Source Tables and Columns
Date
Msg-id 640bb2c44746b8202429564ba2844c5d40d381c3.camel@cybertec.at
Whole thread Raw
In response to Display View Columns and Their Source Tables and Columns  (Susan Hurst <susan.hurst@brookhurstdata.com>)
List pgsql-general
Susan Hurst wrote:
> I'm so close but I can't quite figure out how to match view columns to 
> their source columns in a query.

There is no simple way to find which view column matches which column
in the original table.  Don't forget that the column could be defined
as an expression that involves several columns of the base table.

You'd have to parse pg_rewrite.ev_action.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Backup and Restore (pg_dump & pg_restore)
Next
From: Soni
Date:
Subject: cache lookup failed for function 1 on fmgr_info_cxt_security,fmgr.c:184