"Mendola Gaetano" <[EMAIL PROTECTED]> writes: > On: Sunday, July 13, 2003 4:19 AM "Tom Lane" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend