Re: Default 'now'

Started by Thomas G. Lockhartover 27 years ago3 messages
#1Thomas G. Lockhart
lockhart@alumni.caltech.edu

... and what worked for me was: default (datetime(now())

So, the reason I'm annoying you now is this: For some time now, I've
been wondering what version of PostgreSQL my ISP has running. He's
never answered that particular query, and the version files are not
readable by lowly me.

So, can you tell me in what version of PostgreSQL this worked/broke?

postgres=> create table t (i int,
postgres-> d datetime default datetime(text 'now'));
CREATE

Works now. Have you tried

postgres=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.4.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.1
(1 row)

The CVS log shows something was added back in 1996. Don't know if it
actually worked back then though...
revision 1.1
date: 1996/08/28 01:57:23; author: scrappy;

#2Justin Hickey
jhickey@impact1.hpcc.nectec.or.th
In reply to: Thomas G. Lockhart (#1)
Re: [HACKERS] Re: Default 'now'

Hi all

Could this be added to the FAQ for regular users? Something like "How do I know
what version I'm using?"

Just a thought.

On Aug 7, 5:23am, Thomas G. Lockhart wrote:

Works now. Have you tried

postgres=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.4.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.1
(1 row)

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!
==================================================================

#3Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Justin Hickey (#2)
Re: [HACKERS] Re: Default 'now'

Added to FAQ.

Hi all

Could this be added to the FAQ for regular users? Something like "How do I know
what version I'm using?"

Just a thought.

On Aug 7, 5:23am, Thomas G. Lockhart wrote:

Works now. Have you tried

postgres=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.4.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.1
(1 row)

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!
==================================================================

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)