Re: help regarding function valatality categories

From: Chetan Suttraway <chetan(dot)suttraway(at)enterprisedb(dot)com>
To: siva kiran balijepalli <b(dot)sivakiran(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: help regarding function valatality categories
Date: 2011-03-15 06:05:57
Message-ID: AANLkTim2Kdcb4UmEX-m1XKHQbwyK2bvvWG1W5=P2sGwG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Mar 14, 2011 at 2:26 PM, siva kiran balijepalli <
b(dot)sivakiran(at)gmail(dot)com> wrote:

> Hi all,
>
> can anybody explain with simple example regarding the function valatality
> categories such as VOLATILE/STABLE/IMMUTABLE
>
> I have gone throught the documnetation but didn't had better understanding?
>
> please reply
>
> regards
> siva kiran.B
>

Basically its like asking the behavior in case of a global variable being
accessed by few functions at same time.
Should each function be having separate copy or everyone sees the updated
copy in real time?

Based on this decision, we can specify the function volatility categories.

Also note that this classification of functions is similar to what we have
in other programming languages.
For ex, C programming.

These are categories of functions for better understanding of work that is
going to happen inside them.
And this information will be used by the query optimizer in some way while
generating query plans.

Maybe google will help you further in this query :)

Regards,
Chetan

--
Chetan Sutrave
Senior Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91.20.30589523

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are not
the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Robert Poor 2011-03-15 23:44:18 syntax error on WHERE clause...
Previous Message Andrej 2011-03-15 01:22:40 Re: psql in postgres 9.0.3 not accepting password