Re: BUG #9743: subquery on view is not pulling up.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kwalbrecht(at)cghtech(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9743: subquery on view is not pulling up.
Date: 2014-03-27 17:22:14
Message-ID: 7589.1395940934@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

kwalbrecht(at)cghtech(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message clime7 2014-03-27 23:07:30 BUG #9749: ERROR: unexpected classid 3600
Previous Message kwalbrecht 2014-03-27 13:21:34 BUG #9743: subquery on view is not pulling up.