Re: Lazy View's Column Computing - Mailing list pgsql-general

From Tom Lane
Subject Re: Lazy View's Column Computing
Date
Msg-id 1626111.1627914196@sss.pgh.pa.us
Whole thread Raw
In response to Lazy View's Column Computing  (Avi Weinberg <AviW@gilat.com>)
Responses Re: Lazy View's Column Computing
List pgsql-general
Avi Weinberg <AviW@gilat.com> writes:
> Is there a way to compute a column in a view only if it is referenced in the query?  I have a view's column that its
valueis computed by a function.  If in the query that column is not used at all, can Postgres "skip" computing it? 

If the function is not volatile, and you're using a moderately recent PG
version, I'd expect the planner to do that for you.

            regards, tom lane



pgsql-general by date:

Previous
From: Avi Weinberg
Date:
Subject: Lazy View's Column Computing
Next
From: Vijaykumar Jain
Date:
Subject: Re: Lazy View's Column Computing