Re: how much volatile is a function

From: Sergey Konoplev <sergey(dot)konoplev(at)postgresql-consulting(dot)com>
To: Anibal David Acosta <aa(at)devshock(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how much volatile is a function
Date: 2012-07-12 19:00:59
Message-ID: CAL_0b1unuPXu6P6dort_D1-8uUj2fqyL6o8tA0pZnA3RAeo-qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 12, 2012 at 10:55 PM, Sergey Konoplev
<sergey(dot)konoplev(at)postgresql-consulting(dot)com> wrote:
> On Thu, Jul 12, 2012 at 10:38 PM, Anibal David Acosta <aa(at)devshock(dot)com> wrote:
>> 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?
>
> It does re-run it on each call.

ps. Do not get confused with IMMUTABLE, STABLE and VOLATILE flags. It
is kind of promising to the planner that the function will behave like
specified.

>
> --
> Sergey Konoplev
>
> a database architect, software developer at PostgreSQL-Consulting.com
> http://www.postgresql-consulting.com
>
> Jabber: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp Phone: +79160686204

--
Sergey Konoplev

a database architect, software developer at PostgreSQL-Consulting.com
http://www.postgresql-consulting.com

Jabber: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp Phone: +79160686204

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2012-07-12 20:51:14 Re: Output of query_to_xml
Previous Message Sergey Konoplev 2012-07-12 18:55:27 Re: how much volatile is a function