Avi Weinberg <AviW@xxxxxxxxx> 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 value is 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