Re: Extracting data from the view to retrieve the foreign key is not declared

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "nill *EXTERN*" <nillx87(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extracting data from the view to retrieve the foreign key is not declared
Date: 2014-03-11 08:08:53
Message-ID: A737B7A37273E048B164557ADEF4A58B17CE391E@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

nill wrote:
> Given a view, I need to extract tables, the join columns (ON) . I need to do
> this analysis because of the view (agreements with the join condition and
> where) I can say that there is a foreign key

Do I understand right that you want to find out the tables involved in
a view definition?

Maybe querying pg_depend can help, since there are dependency relationships
between the view and its query rewrite rule, but also between the rule and
the columns of the underlying tables.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Förtsch 2014-03-11 12:15:50 How to make PG use work_mem?
Previous Message Venkata Balaji Nagothi 2014-03-11 02:35:23 Re: Increase in max_connections