Skip site navigation (1) Skip section navigation (2)

Re: Function immutable is not during a reindex ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: Function immutable is not during a reindex ?
Date: 2003-07-13 15:21:06
Message-ID: 22172.1058109666@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-bugs
"Mendola Gaetano" <mendola(at)bigfoot(dot)com> writes:
> On: Sunday, July 13, 2003 4:19 AM "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So?  Sounds to me like it's working as intended.

> Well the documentation says:  
> IMMUTABLE [...] If this option is given, 
> any call of the function with all-constant 
> arguments can be immediately replaced 
> with the function value. 

Note it says "can be", not "always will be".  IMMUTABLE is a promise
you make to the system about the function's behavior ... not vice
versa.

> Used as default value:
> # alter table t_a alter b set default test(3);
> NOTICE:  test called
> ALTER TABLE

> #\d t_a
>       Table "public.t_a"
>  Column |  Type   | Modifiers 
> --------+---------+-----------
>  a      | integer | 
>  b      | integer | default 4

This is a bug, or at least a bad idea in hindsight, and 7.4 doesn't
do it anymore.

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Mendola GaetanoDate: 2003-07-13 18:08:41
Subject: Re: Function immutable is not during a reindex ?
Previous:From: Andrew BiagioniDate: 2003-07-13 14:16:33
Subject: Re: Installazione Postgres

pgsql-bugs by date

Next:From: Tomas SzepeDate: 2003-07-13 16:24:28
Subject: segfault at aset.c:539
Previous:From: Mendola GaetanoDate: 2003-07-13 12:12:15
Subject: Re: Function immutable is not during a reindex ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group