Mapping view columns to their source columns

Поиск
Список
Период
Сортировка
От Matt Andrews
Тема Mapping view columns to their source columns
Дата
Msg-id CAPeDGQ6KrAL8+8myKWorcj02G05otgMrSgOzi9axemaZf=cScA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Mapping view columns to their source columns
Список pgsql-general
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




В списке pgsql-general по дате отправления:

Предыдущее
От: Paul McGarry
Дата:
Сообщение: Re: How to get timezone offset in timestamp with time zone AT TIMEZONE output.
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: How to get timezone offset in timestamp with time zone AT TIME ZONE output.