Re: immutable stable volatile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "PostgreSQL general mail list" <pgsql-general(at)list(dot)coretech(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: immutable stable volatile
Date: 2004-12-06 18:41:08
Message-ID: 5061.1102358468@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-12-06 18:44:20 Re: DBD::PgSPI 0.02
Previous Message PostgreSQL general mail list 2004-12-06 18:40:11 immutable stable volatile