dbTalk Databases Forums  

Re: [BUGS] [ADMIN] Function immutable is not during a reindex ?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] [ADMIN] Function immutable is not during a reindex ? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [ADMIN] Function immutable is not during a reindex ? - 07-12-2003 , 09:21 PM






"Mendola Gaetano" <mendola (AT) bigfoot (DOT) com> writes:
Quote:
the function is immutable but is executed 3 times
( one for each row).
So? Sounds to me like it's working as intended.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [ADMIN] Function immutable is not during a reindex ? - 07-13-2003 , 10:23 AM






"Mendola Gaetano" <mendola (AT) bigfoot (DOT) com> writes:
Quote:
On: Sunday, July 13, 2003 4:19 AM "Tom Lane" <tgl (AT) sss (DOT) 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.

Quote:
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


Reply With Quote
  #3  
Old   
Mendola Gaetano
 
Posts: n/a

Default Re: [BUGS] [ADMIN] Function immutable is not during a reindex ? - 07-13-2003 , 11:13 AM



"Tom Lane" <tgl (AT) sss (DOT) pgh.pa.us> wrote:
Quote:
"Mendola Gaetano" <mendola (AT) bigfoot (DOT) com> writes:
#\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.
Indead I was thinking that was a nice feature have a function
cached...
:-(

regards
Gaetano




---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.