pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Igal @ Lucee.org <igal@lucee.org>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Function Volatility Stable vs Immutable
Date: Mon, 24 Jun 2019 19:31:27 -0700
Message-ID: <8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org> (raw)

If a function select data from a table, and the rows in the table may 
change, would that function qualify for Immutable or does it have to be 
Stable?  I'm asking because according to the docs [1]: "An IMMUTABLE 
function cannot modify the database and is guaranteed to return the same 
results given the same arguments forever".

So for the same arguments, the result would change only if the data in 
the table changes.  Does that mean that it violates the "forever" clause 
and therefore can be only marked as Stable and not Immutable?

Thanks,

Igal







view thread (3+ messages)  latest in thread

Message-ID: <8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org>
Permalink:  ../8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org/
Also on:    postgresql.org/message-id/8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: igal@lucee.org
  Subject: Re: Function Volatility Stable vs Immutable
  In-Reply-To: <8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org>
  References: <8a4ed1a2-74de-0fa3-e2a2-7b68b60b0a4f@lucee.org>

* 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