Re: BUG #9743: subquery on view is not pulling up. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9743: subquery on view is not pulling up.
Date
Msg-id 7589.1395940934@sss.pgh.pa.us
Whole thread Raw
In response to BUG #9743: subquery on view is not pulling up.  (kwalbrecht@cghtech.com)
List pgsql-bugs
kwalbrecht@cghtech.com writes:
> When I query a view which has calculated values, even if I don't select one
> of the calculated values, they are being calculated.

This example looks like the functions in question are marked volatile;
that prevents the view from being flattened, since doing so would
eliminate side-effects the user might be expecting to happen.  Assuming
yours are side-effect-free, mark them stable or immutable as appropriate.

http://www.postgresql.org/docs/9.2/static/xfunc-volatility.html

            regards, tom lane

pgsql-bugs by date:

Previous
From: kwalbrecht@cghtech.com
Date:
Subject: BUG #9743: subquery on view is not pulling up.
Next
From: Maxim Boguk
Date:
Subject: Re: BUG #9741: Mininal case for the BUG #9735: Error: "ERROR: tuple offset out of range: 0" during bitmap scan