Re: Related tables to a view

From: "Jan Meyland Andersen" <jma(at)agile(dot)dk>
To: "Jim Buttafuoco" <jim(at)contactbda(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Related tables to a view
Date: 2006-12-27 15:58:52
Message-ID: 1255.62.66.218.59.1167235132.squirrel@mail.agile.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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.relname
> and v.relname='YOUR VIEW NAME HERE'
> order by 1
>

Thanks a lot. That is exactly what I need.

Regards

Jan

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kashmira Patel (kupatel) 2006-12-27 19:52:38 Unable to drop table, error mentions "reltriggers"
Previous Message BillR 2006-12-27 03:10:24 domains and serial