Re: Very strange 'now' behaviour in nested triggers.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Denis Zaitsev <zzz(at)anda(dot)ru>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Very strange 'now' behaviour in nested triggers.
Date: 2003-07-30 13:48:54
Message-ID: 9174.1059572934@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-sql

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Strangely, CURRENT_TIMESTAMP converts to 'now', not now(). Is that a
> problem?

No, it is not, because the text-to-timestamptz conversion is marked
volatile and won't be const-folded. I've always thought it was a very
ugly implementation though, mainly because it doesn't reverse-list
nicely in rule dumps. Sometime we should try to fix it so that it
reverse-lists as "current_timestamp(n)", and likewise for the similar
special cases in gram.y.

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kim Ho 2003-07-30 14:32:50 SetFetchSize and SetFetchDirection
Previous Message Kris Jurka 2003-07-30 11:42:55 Re: How to insert Chinese (big5) through JDBC?

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-07-30 15:19:09 Re: now 7.2.3 - 7.3.3
Previous Message Keith H.K. Lam (U1 Tech.) 2003-07-30 11:28:04 select query that would join two databases