Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Related tables to a view



> 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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group