Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9E1B04770B8 for ; Mon, 7 Oct 2002 08:47:17 -0400 (EDT) Received: from lerlaptop.iadfw.net (pppth08-291.ght.iadfw.net [207.136.52.165]) by postgresql.org (Postfix) with ESMTP id 069154764A3 for ; Mon, 7 Oct 2002 08:25:10 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by lerlaptop.iadfw.net (8.12.6/8.12.5) with ESMTP id g97CP8nk000618; Mon, 7 Oct 2002 07:25:09 -0500 (CDT) (envelope-from ler@lerctr.org) Subject: Re: timestamp From: Larry Rosenman To: Brian Ward Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 07 Oct 2002 07:25:08 -0500 Message-Id: <1033993509.311.17.camel@lerlaptop> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/87 X-Sequence-Number: 9805 On Sun, 2002-10-06 at 09:41, Brian Ward wrote: > How do I create a time stamp column in a table that default to the current > time > when a row is inserted? > I tried putting in now() as the default but I have something wrong > with the syntax or something I think > Any one have an example of a table creation script that has a timestamp > column? "comment_timestamp" timestamp(0) with time zone DEFAULT now() that's a live one from a table I have. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749