Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAE3eGm68026 for ; Tue, 13 Nov 2001 22:40:16 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id fAE3eEw21529; Tue, 13 Nov 2001 22:40:14 -0500 (EST) From: Bruce Momjian Message-Id: <200111140340.fAE3eEw21529@candle.pha.pa.us> Subject: Re: Use of 'now' In-Reply-To: "from Vince Vielhaber at Nov 13, 2001 10:15:22 pm" To: Vince Vielhaber Date: Tue, 13 Nov 2001 22:40:13 -0500 (EST) CC: Tom Lane , PostgreSQL-documentation X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200111/30 X-Sequence-Number: 1103 > > 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. You would think so, but in fact 'current' does change for each insert: test=> create table dd (x timestamp default 'current', y int); CREATE test=> insert into dd (y) values (1); INSERT 16596 1 test=> insert into dd (y) values (1); INSERT 16597 1 test=> select * from dd; x | y -------------------------------+--- 2001-11-13 22:39:18.283834-05 | 1 2001-11-13 22:39:19.196797-05 | 1 (2 rows) -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026