Received: from downtown.oche.de (root@downtown.oche.de [194.94.253.3]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA64419 for ; Tue, 7 Sep 1999 02:42:59 -0400 (EDT) (envelope-from darwin!mne.de!mne@downtown.oche.de) Received: from darwin.UUCP (uucp@localhost) by downtown.oche.de (8.9.3/8.9.3/Debian/GNU) with UUCP id IAA24406 for postgreSQL.org!pgsql-sql; Tue, 7 Sep 1999 08:30:00 +0200 Received: from darwin.oche.de (really [127.0.0.1]) by darwin.oche.de via in.smtpd with smtp id (Debian Smail3.2.0.101) for pgsql-sql@postgreSQL.org; Tue, 7 Sep 1999 08:22:22 +0200 (CEST) Message-Id: Date: Tue, 7 Sep 1999 08:22:22 +0200 (CEST) From: Martin Neumann To: pgsql-sql@postgreSQL.org Subject: How to put into 'now' into a datetime field table foobar { [...] created datetime NOT NULL DEFAULT x } I want to put the current transaction time into "created" when inserting into the table. After reading the manual I've tried the following combinations for x: 'now' ''now'' (''now'') ('now') datetime('now') datetime(''now'') datetime('now'::abstime) 'now'::datetime ('now'::datetime) And perhaps some more I forgot. The only one not resulting in an syntax error when creating the table is 'now'. But using simply 'now' gives a strange result: When I insert the first tuple the datetime-value is okay. But when I insert further tuples they get the same datetime-value as the first inserted tuple. -- Martin Neumann mne@mne.de