Re: Use of 'now'

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Use of 'now'
Date: 2001-11-14 03:15:22
Message-ID: Pine.BSF.4.40.0111132213030.80302-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Tue, 13 Nov 2001, Bruce Momjian wrote:

> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > This seems wrong to me. What does it mean when it says 'current' is
> > > resolved every time the value is retrieved?
> >
> > Nothing of interest anymore, since 'current' has been removed as of 7.2.
> > However, Thomas has yet to commit any docs updates for his recent
> > datetime-related changes ... including that one ...
>
> Seems it is still in there somewhere:
>
> test=> create table bb (x timestamp default 'current', y int);
> CREATE
> test=> insert into bb (y) values (1);
> INSERT 16591 1
> test=> select * from bb;
> x | y
> -------------------------------+---
> 2001-11-13 21:45:22.473896-05 | 1
> (1 row)
>
> Do you mean that 'current' is now the same as 'now'? :-)

ISTM that 'current' when used as a default meant the time the table
was created but now() would (as one woule expect) return the current
datetime.

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2001-11-14 03:40:13 Re: Use of 'now'
Previous Message Roberto Mello 2001-11-14 03:07:41 Re: Book pl/pgsql functions

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-11-14 03:40:13 Re: Use of 'now'
Previous Message Tom Lane 2001-11-14 02:52:32 Re: Use of 'now'