Re: Changing behavior of BEGIN...sleep...do something...COMMIT

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Date: 2003-05-26 18:36:34
Message-ID: 200305261836.h4QIaYk10865@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


TODO updated (already reported):

* Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
functionality

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Alvaro Herrera wrote:
> >> While at this, what do you think about adding the necessary variables
> >> to make now('transaction') and now('query') possible?
>
> > TODO already has:
> > * Add now("transaction|statement|clock") functionality
>
> I know that's what we agreed to awhile back, but I've realized that that
> would be a foolish way to do it.
>
> The problem is that such a function would have to be marked VOLATILE,
> which would prevent its use in indexscan qualifiers. The volatility
> labeling is a property of the function, not of the particular argument
> it's passed, so we'd have to label it for the worst-case behavior.
>
> Accordingly, it's a bad idea to invent now('clock') and make it the
> same function as the other flavors. We could get away with making
> now('transaction') and now('statement') ---- but the argument for this
> was consistency, and that argument pretty much falls flat if those two
> are one function while clock time is something else.
>
> So I'm back in the camp of thinking three separate parameterless
> functions are the way to do it. We already know what now() does,
> and we're not going to change it --- anyone want to propose names
> for the other two?
>
> regards, tom lane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-05-26 18:47:40 Re: Removing a user's password
Previous Message Bruce Momjian 2003-05-26 18:35:54 Re: Changing behavior of BEGIN...sleep...do something...COMMIT