Re: ALTER TABLE ... SET DEFAULT - Mailing list pgsql-admin

From Tom Lane
Subject Re: ALTER TABLE ... SET DEFAULT
Date
Msg-id 13011.1018670215@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE ... SET DEFAULT  (Brian McCane <bmccane@mccons.net>)
List pgsql-admin
Brian McCane <bmccane@mccons.net> writes:
> Okay, so if I create a function as 'iscachable', it assumes that the value
> will never change, calls the function and places the value in as the
> default?  This doesn't make sense to me since the 'iscacheable' only works
> inside of a transaction block.

Um ... I already told you, that is *not* the meaning of 'isCachable'.

7.3 will split this term into 'isImmutable' and 'isStable', where the
latter means approximately what you seem to expect.  But the practical
behavior of existing releases is that 'isCachable' means 'fixed forever
given fixed input arguments'.  If you don't like it, argue with the
code.

            regards, tom lane

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE ... SET DEFAULT
Next
From: "Nick Fankhauser"
Date:
Subject: Re: A *short* planner question