Re: [PORTS] 'current'::datetime

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Peter Schaefer <schaefer(at)cys(dot)de>
Cc: "pgsql-ports(at)postgreSQL(dot)org" <pgsql-ports(at)postgreSQL(dot)org>
Subject: Re: [PORTS] 'current'::datetime
Date: 1999-10-11 15:12:33
Message-ID: 3801FE61.F4EB473F@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

> Excuse me does the 'current'::datetime work ?

Sure. But the behavior one might want from 'current' requires that
printing or representing it in its raw form preserves its
"current-ness". If you want 'current' instantiated into a time, you
have to do some math, or some other operation which will nail it to
the time you evaluate it. Here is an example:

postgres=> select datetime 'now' as now,
postgres-> datetime 'current' as current,
postgres-> datetime 'current' + timespan '0 sec' as equiv;
now |current|equiv
----------------------+-------+----------------------
1999-10-11 15:09:58+00|current|1999-10-11 15:09:58+00
(1 row)

Hope this helps. Good luck.

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Dave Hill 1999-10-11 17:55:30 Compaq/Digital Unix compilation issue
Previous Message Pedro J. Lobo 1999-10-11 08:37:14 Re: [BUGS] 6.5.2 broken on alpha/Tru64 Unix 4.0d/cc