> Try this query
>
>
> select a.relname as base,a.relkind
> from
> pg_class a
> join pg_depend d on (a.oid = d.refobjid)
> join pg_class c on (d.classid = c.oid)
> join pg_rewrite r on (objid = r.oid)
> join pg_class v on (ev_class = v.oid)
> where a.relkind in('r', 'v')
> and a.relname <> v.relnam
elname
and v.relname='YOUR VIEW NAME HERE'
order by 1
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jan Meyland Andersen
Sent: Tuesday, December 26, 2006 3:11 PM
To: Michael Fuhr
Cc: Jan Meyland Andersen; pgsql-sql@postgresql.org
Subject: Re: [
> You could query pg_depend to find out which tables and columns the
> view's rewrite rule depends on but that's not as specific as what
> you're requesting. I'm not aware of a way to associate a particular
> table column with a particular view column short of parsing the view
> definition or rule
> You could query pg_depend to find out which tables and columns the
> view's rewrite rule depends on but that's not as specific as what
> you're requesting. I'm not aware of a way to associate a particular
> table column with a particular view column short of parsing the view
> definition or
On Mon, Dec 25, 2006 at 10:52:03PM +0100, Jan Meyland Andersen wrote:
> If I have a view which is a selection from field1 and field2 from table1
> and field1 and field2 from table2.
>
> How can I make a selection which returns the relation for the fields in a
> way so I am able to se which field b
Hi
I need a function which are able to return the underlying tables to a view.
If I have a view which is a selection from field1 and field2 from table1
and field1 and field2 from table2.
How can I make a selection which returns the relation for the fields in a
way so I am able to se which field