pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian McCane <bmccane@mccons.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: ALTER TABLE ... SET DEFAULT
Date: Fri, 12 Apr 2002 19:43:17 -0500 (CDT)
Message-ID: <20020412194103.R59745-100000@fw.mccons.net> (raw)
In-Reply-To: <12004.1018657800@sss.pgh.pa.us>


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"




view thread (8+ messages)  latest in thread

Message-ID: <20020412194103.R59745-100000@fw.mccons.net>
Permalink:  ../20020412194103.R59745-100000@fw.mccons.net/
Also on:    postgresql.org/message-id/20020412194103.R59745-100000@fw.mccons.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bmccane@mccons.net, tgl@sss.pgh.pa.us
  Subject: Re: ALTER TABLE ... SET DEFAULT
  In-Reply-To: <20020412194103.R59745-100000@fw.mccons.net>
  References: <12004.1018657800@sss.pgh.pa.us> <20020412194103.R59745-100000@fw.mccons.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox