pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: mmoncure@gmail.com
Cc: damon@huddler-inc.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Stored procedure declared as VOLATILE => no good optimization is done
Date: Fri, 15 Oct 2010 22:31:34 -0400
Message-ID: <26735.1287196294@sss.pgh.pa.us> (raw)
In-Reply-To: <20101016.104738.1076064300636336418.t-ishii@sraoss.co.jp>
References: <AANLkTik6ynVXSZL9zbAcB12-+S1RfLoNQUGNANTNJjsH@mail.gmail.com>
	<AANLkTin9sD8RCTcFqm1JG2fCLZKpMTZaFDcSDern=3iS@mail.gmail.com>
	<20101016.104738.1076064300636336418.t-ishii@sraoss.co.jp>

Tatsuo Ishii <ishii@postgresql.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



view thread (7+ messages)  latest in thread

Message-ID: <26735.1287196294@sss.pgh.pa.us>
Permalink:  ../26735.1287196294@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26735.1287196294@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ishii@postgresql.org, mmoncure@gmail.com, damon@huddler-inc.com
  Subject: Re: Stored procedure declared as VOLATILE => no good optimization is done
  In-Reply-To: <26735.1287196294@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox