Excuse me does the 'current'::datetime work ?
I see this in the database at moment which I believe to be committed .. .

Sat Oct 09 18:11:35 1999 MET DST
Mon Oct 18 00:00:00 1999 MET DST

Peter Schäfer - mailto:schaefer@cys.de, schaefer@dfu.de
Motto of the 3D Designer: "I am a meshed potato, I can do the twist".

Search Discussions

  • Thomas Lockhart at Oct 11, 1999 at 3:18 pm
    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@alumni.caltech.edu
    South Pasadena, California

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-ports @
postedOct 9, '99 at 4:19p
activeOct 11, '99 at 3:18p

2 users in discussion

Peter Schaefer: 1 post Thomas Lockhart: 1 post



site design / logo © 2022 Grokbase