Re: pl/pgsql enabled by default
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@mit.edu>
Cc: pgsql-hackers@postgresql.org
Date: 2005-05-09T04:00:21Z
Lists: pgsql-hackers
Greg Stark <gsstark@mit.edu> writes: > Hm. If you incorrectly mark your function as IMMUTABLE even though it > has side effects then the planner may indeed collapse this. Does the > planner know it can't collapse views if the underlying tables aren't > accessible to the user? There are no cases where function or view collapsing elides permissions checks (if you have a counterexample please provide it!!). They could change the time at which permissions checks are applied, though; which has the potential for a REVOKE to not disallow execution of already- planned queries that ideally it should prevent. I believe that this risk will be fixed by the planned forcing of replanning after schema changes. regards, tom lane