Re: Underlying view columns?

From: Fredrik Olsson <fredrik(dot)olsson(at)treyst(dot)se>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Underlying view columns?
Date: 2005-11-11 07:36:05
Message-ID: 437449E5.700@treyst.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Fredrik Olsson <fredrik(dot)olsson(at)treyst(dot)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(dot)olsson(at)treyst(dot)se

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2005-11-11 08:08:11 Re: pg_proc.h
Previous Message Dennis Bjorklund 2005-11-11 06:30:42 Re: 8.0 -> 8.1 dump duplicate key problem?