Re: Underlying view columns? - Mailing list pgsql-hackers

From Fredrik Olsson
Subject Re: Underlying view columns?
Date
Msg-id 437449E5.700@treyst.se
Whole thread Raw
In response to Re: Underlying view columns?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Fredrik Olsson <fredrik.olsson@treyst.se> writes:
>   
>> Have I misunderstood the concept of pg_depend? Can it even be used for 
>> what I intend, and if not in what direction should I be searching next?
>>     
>
> What you missed is that the per-column dependencies you are looking for
> go from the view's rewrite rule to the underlying table.
>   
<snip>
> There isn't anything in pg_depend that would let you associate
> particular columns of bar's output with particular dependencies, so I'm
> not sure it really will help for your problem.  I don't think there's
> any way you could find that out except by parsing the stored rule
> expression, which I would strongly NOT recommend, as your code will
> inevitably break every time we modify expression trees (which is often).
>
>             regards, tom lane
>   
Thanks for the good explanation. I resort to keep depending on 
name-similarities, with added exceptions for legacy objects. That and 
some well documented guidelines for this projects future additions 
solves the problem, in a way that looks good to the end user at least :).

-- 
//Fredrik Olsson Treyst AB +46-19-362182 fredrik.olsson@treyst.se



pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: 8.0 -> 8.1 dump duplicate key problem?
Next
From: "Dave Page"
Date:
Subject: Re: pg_proc.h