Search Postgresql Archives

Mapping view columns to their source columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to map view columns to their source columns using the system catalogs and information schema, but not having much luck.  It's easy to determine which columns a view depends on, but not how those columns are mapped to the columns of the view. It seems like the only way to do is this is to somehow query the pg_node_tree in pg_rewrite.ev_call.

I'm trying to do this to provide meta data for an API. For example:
- a database design's API is implemented via functions
- a function returns a setof a particular view
- the web server that is serving the data might want to manipulate the returned data based on the types/constraints of the underlying columns of the view.

It seems like mapping view columns to their source columns should be something that's been done before. Is it possible?

Matt Andrews

0400 990 131





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux