Re: ALTER TABLE ... SET DEFAULT
От | Brian McCane |
---|---|
Тема | Re: ALTER TABLE ... SET DEFAULT |
Дата | |
Msg-id | 20020412194103.R59745-100000@fw.mccons.net обсуждение исходный текст |
Ответ на | Re: ALTER TABLE ... SET DEFAULT (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: ALTER TABLE ... SET DEFAULT
Re: ALTER TABLE ... SET DEFAULT |
Список | pgsql-admin |
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 <bmccane@mccons.net> 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"
В списке pgsql-admin по дате отправления: