X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 550B1D1B275 for ; Sat, 19 Jun 2004 09:25:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95208-09 for ; Sat, 19 Jun 2004 12:25:46 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 7C859D1B272 for ; Sat, 19 Jun 2004 09:25:41 -0300 (ADT) Received: (qmail 23564 invoked by uid 65534); 19 Jun 2004 12:25:44 -0000 Received: from dsl-213-023-254-180.arcor-ip.net (EHLO colt.pezone.net) (213.23.254.180) by mail.gmx.net (mp011) with SMTP; 19 Jun 2004 14:25:44 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: "David B" , Subject: Re: In 7.4 ensure you have DEFAULT now () with no spaces Date: Sat, 19 Jun 2004 14:25:43 +0200 User-Agent: KMail/1.5.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200406191425.43379.peter_e@gmx.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/164 X-Sequence-Number: 18109 David B wrote: > We had been testing 7.4 for a few days and just noticed that some > tables had created_timestamp rows with a date/time of the date the DB > was created...not the date/time the insert was done. > > Looking at those tables the create DDL's for those few tables > contained now () > as in: > > created_timestamp timestamp DEFAULT now () -- note the space > between now and () > > Most had correctly been defined without the space - as in now() Whatever it was, that was not the problem. With 7.4.1: peter=# create table test1 (foo text, create_timestamp timestamp default now()); CREATE TABLE peter=# create table test2 (foo text, create_timestamp timestamp default now ()); CREATE TABLE peter=# create table test3 (foo text, create_timestamp timestamp default now peter(# /* blah */ peter(# ( peter(# /* blah */ peter(# ) peter(# ) peter-# ; CREATE TABLE peter=# \d test1 Table "public.test1" Column | Type | Modifiers ------------------+-----------------------------+--------------- foo | text | create_timestamp | timestamp without time zone | default now() peter=# \d test2 Table "public.test2" Column | Type | Modifiers ------------------+-----------------------------+--------------- foo | text | create_timestamp | timestamp without time zone | default now() peter=# \d test3 Table "public.test3" Column | Type | Modifiers ------------------+-----------------------------+--------------- foo | text | create_timestamp | timestamp without time zone | default now() They're all identical.