Re: how much volatile is a function

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'Anibal David Acosta'" <aa(at)devshock(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: how much volatile is a function
Date: 2012-07-12 18:48:54
Message-ID: 00e901cd605e$fd40ff20$f7c2fd60$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Anibal David Acosta
Sent: Thursday, July 12, 2012 2:39 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] how much volatile is a function

I have a table, this table are rarely changed (added or deleted).
My function receive parameters and do a query to the table.

Does postgres re run the query on each function call, or has some kind of
"flag" indicating that table as not been changed and return cached result of
a previous call if the call has same parameters?

Thanks!

==============================================

See here:

http://www.postgresql.org/docs/9.1/interactive/sql-createfunction.html

Read the difference between IMMUTABLE, STABLE, and VOLATILE

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2012-07-12 18:55:27 Re: how much volatile is a function
Previous Message Anibal David Acosta 2012-07-12 18:38:30 how much volatile is a function