pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Meyland Andersen <jma@agile.dk>
To: Jim Buttafuoco <jim@contactbda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Related tables to a view
Date: Wed, 27 Dec 2006 16:58:52 +0100 (CET)
Message-ID: <1255.62.66.218.59.1167235132.squirrel@mail.agile.dk> (raw)
In-Reply-To: <200612262027.kBQKR80j031116@amanda.contactbda.com>
References: <1260.62.66.218.59.1167163837.squirrel@mail.agile.dk>
	<200612262027.kBQKR80j031116@amanda.contactbda.com>

> 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




view thread (6+ messages)

Message-ID: <1255.62.66.218.59.1167235132.squirrel@mail.agile.dk>
Permalink:  ../1255.62.66.218.59.1167235132.squirrel@mail.agile.dk/
Also on:    postgresql.org/message-id/1255.62.66.218.59.1167235132.squirrel@mail.agile.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jma@agile.dk, jim@contactbda.com
  Subject: Re: Related tables to a view
  In-Reply-To: <1255.62.66.218.59.1167235132.squirrel@mail.agile.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox