"PostgreSQL general mail list" <pgsql-general(at)list(dot)coretech(dot)ro> writes:
> if a function does insert/update/delete it needs to be stable or volatile ?
> if a immutable function executes 'nextval' should itself be also volatile ?
A function that has side-effects must be marked volatile; there are
no exceptions.
PG 8.0 actually enforces this to some extent, but you can get burned in
any version if you ignore the rule.
regards, tom lane