Re: [SQL] Calculation dependencies in views - Mailing list pgsql-sql

From Rick Delaney
Subject Re: [SQL] Calculation dependencies in views
Date
Msg-id 3874F00D.F6A504B9@consumercontact.com
Whole thread Raw
In response to Calculation dependencies in views  (Rick Delaney <rick@consumercontact.com>)
List pgsql-sql
Tom Lane wrote:
> 
> Jan Wieck <wieck@debis.com> writes:
> 
> >      These two examples will result in exactly the same querytree after
> >      rewriting, if you SELECT from v1. The second needs two passes in the
> >      rewriter, but that's the only difference.
> 
> Actually, there's another big difference: the stored rule plan string
> for v1 in the second case is shorter than it is in the first case,
> because the a+b additions don't show up as operator nodes in v1's
> definition in the second case.  (If the references to v1_sub were
> flattened out before the rule were stored, it wouldn't take two passes
> of rewriting to expand the rule.  But they aren't, and it does ;-).)

Interesting.  Anyway, I grok it now.  Thank you both for all your help.

Cheers,

--Rick


pgsql-sql by date:

Previous
From: Vladimir Terziev
Date:
Subject: Re: [SQL] Autonumber column
Next
From: "Richard Walker"
Date:
Subject: Serial field starting at 100 ?