Received: from fw.mccons.net (adsl-65-64-105-41.dsl.kscymo.swbell.net [65.64.105.41]) by postgresql.org (Postfix) with ESMTP id 80BE3475476 for ; Fri, 12 Apr 2002 20:43:29 -0400 (EDT) Received: (from root@localhost) by fw.mccons.net (8.11.3/8.11.4) id g3D0hVD80015; Fri, 12 Apr 2002 19:43:31 -0500 (CDT) (envelope-from bmccane@mccons.net) Received: from localhost (localhost [127.0.0.1]) by fw.mccons.net (8.11.3/8.11.4av) with ESMTP id g3D0hHj79934; Fri, 12 Apr 2002 19:43:17 -0500 (CDT) (envelope-from bmccane@mccons.net) Date: Fri, 12 Apr 2002 19:43:17 -0500 (CDT) From: Brian McCane To: Tom Lane Cc: pgsql-admin Subject: Re: ALTER TABLE ... SET DEFAULT In-Reply-To: <12004.1018657800@sss.pgh.pa.us> Message-ID: <20020412194103.R59745-100000@fw.mccons.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS perl-11 X-Razor-Spam-ID: 94af3bf90a3b4591ca2a88b0879ceb2caa9e1922 X-Archive-Number: 200204/106 X-Sequence-Number: 3994 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. If I call my function a hundred times, I get a hundred different answers. Once I do a 'BEGIN', the result never changes again until I 'COMMIT', which is what I would expect according to the docs I have found. - brian On Fri, 12 Apr 2002, Tom Lane wrote: > > Brian McCane writes: > > Been there, done that :). It put the current epoch value in as the > > default value for updated. > > That would suggest that you marked since_epoch() as cachable. Wrong > thing to do, if you want it evaluated again every time the default > is used. > > regards, tom lane > Wm. Brian McCane | Life is full of doors that won't open Search http://recall.maxbaud.net/ | when you knock, equally spaced amid those Usenet http://freenews.maxbaud.net/ | that open when you don't want them to. Auction http://www.sellit-here.com/ | - Roger Zelazny "Blood of Amber"