Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> So can I say "if a function is marked IMMUTABLE, then it should never
> modify database"? Is there any counter example?
> It seems if above is correct, I can say STABLE functions should never
> modify databases as well.
Both of those things are explicitly stated here:
http://developer.postgresql.org/pgdocs/postgres/xfunc-volatility.html
regards, tom lane