pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mendola Gaetano <mendola@bigfoot.com>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: Function immutable is not during a reindex ?
Date: Sun, 13 Jul 2003 11:21:06 -0400
Message-ID: <22172.1058109666@sss.pgh.pa.us> (raw)
In-Reply-To: <002f01c34937$ff7c48f0$10d4a8c0@mm.eutelsat.org>
References: <002201c348ea$ab5f4300$10d4a8c0@mm.eutelsat.org>
	<19654.1058062747@sss.pgh.pa.us>
	<002f01c34937$ff7c48f0$10d4a8c0@mm.eutelsat.org>

"Mendola Gaetano" <mendola@bigfoot.com> writes:
> On: Sunday, July 13, 2003 4:19 AM "Tom Lane" <tgl@sss.pgh.pa.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



view thread (5+ messages)  latest in thread

Message-ID: <22172.1058109666@sss.pgh.pa.us>
Permalink:  ../22172.1058109666@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22172.1058109666@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mendola@bigfoot.com, pgsql-bugs@postgresql.org
  Subject: Re: Function immutable is not during a reindex ?
  In-Reply-To: <22172.1058109666@sss.pgh.pa.us>
  References: <002201c348ea$ab5f4300$10d4a8c0@mm.eutelsat.org> <19654.1058062747@sss.pgh.pa.us> <002f01c34937$ff7c48f0$10d4a8c0@mm.eutelsat.org> <22172.1058109666@sss.pgh.pa.us>

* 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