pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andriy Tkachuk <ant@imt.com.ua>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
Date: Thu, 9 Oct 2003 10:25:33 +0300 (EEST)
Message-ID: <20031009101121.S29282-100000@pool.imt.com.ua> (raw)
In-Reply-To: <5442.1065651752@sss.pgh.pa.us>

On Wed, 8 Oct 2003, Tom Lane wrote:

> Andriy Tkachuk <ant@imt.com.ua> writes:
> > At second. calc_total() is immutable function:
> > but it seems that it's not cached in one session:
>
> It's not supposed to be.

but it's written id doc:

              IMMUTABLE indicates that the function always  returns  the  same
              result when given the same argument values; that is, it does not
              do database lookups or otherwise use  information  not  directly
              present in its parameter list. If this option is given, any call
              of the function with all-constant arguments can  be  immediately
              replaced with the function value.

I meant that the result of calc_total() is not "immediately replaced with the function value"
as it's written in doc, but it takes as long time as the first function call
in the session (with the same arguments).

Maybe i misunderstand something?

Thank you,
 Andriy Tkachuk.

http://www.imt.com.ua




view thread (7+ messages)  latest in thread

Message-ID: <20031009101121.S29282-100000@pool.imt.com.ua>
Permalink:  ../20031009101121.S29282-100000@pool.imt.com.ua/
Also on:    postgresql.org/message-id/20031009101121.S29282-100000@pool.imt.com.ua

 · 

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: ant@imt.com.ua, tgl@sss.pgh.pa.us
  Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
  In-Reply-To: <20031009101121.S29282-100000@pool.imt.com.ua>

* 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