Lazy View's Column Computing

From: Avi Weinberg <AviW(at)gilat(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Lazy View's Column Computing
Date: 2021-08-02 14:12:38
Message-ID: DB9PR07MB7180094FC2775BFD3A61CC0DCBEF9@DB9PR07MB7180.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

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 value is computed by a function. If in the query that column is not used at all, can Postgres "skip" computing it?

Thanks!
IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-08-02 14:23:16 Re: Lazy View's Column Computing
Previous Message David G. Johnston 2021-08-02 14:00:20 Re: Automatic backup in windows