Re: immutable stable volatile - Mailing list pgsql-general

From Tom Lane
Subject Re: immutable stable volatile
Date
Msg-id 5061.1102358468@sss.pgh.pa.us
Whole thread Raw
In response to immutable stable volatile  ("PostgreSQL general mail list" <pgsql-general@list.coretech.ro>)
List pgsql-general
"PostgreSQL general mail list" <pgsql-general@list.coretech.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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: When to encrypt
Next
From: "David Esposito"
Date:
Subject: Re: Performance tuning on RedHat Enterprise Linux 3