Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 079A52E3796 for ; Tue, 15 Jan 2008 11:53:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 22541-04-2 for ; Tue, 15 Jan 2008 11:53:32 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 846D62E34CB for ; Tue, 15 Jan 2008 11:53:38 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0FFrWlR024169; Tue, 15 Jan 2008 10:53:32 -0500 (EST) To: =?ISO-8859-1?Q?Magne_M=E6hre?= cc: Joost Kraaijeveld , pgsql-sql@postgresql.org Subject: Re: Is DATETIME an ANSI-SQL type? In-reply-to: <478CB8FB.5040600@sun.com> References: <1200403108.27286.63.camel@panoramix.askesis.nl> <478CB8FB.5040600@sun.com> Comments: In-reply-to =?ISO-8859-1?Q?Magne_M=E6hre?= message dated "Tue, 15 Jan 2008 14:45:31 +0100" Date: Tue, 15 Jan 2008 10:53:32 -0500 Message-ID: <24168.1200412412@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/129 X-Sequence-Number: 29982 =?ISO-8859-1?Q?Magne_M=E6hre?= writes: > Joost Kraaijeveld wrote: >> Can anyone tell me if DATETIME is an ANSI SQL type? > No. > The Datetime types defined in SQL (ISO/IEC 9075:2003) are > DATE > TIME WITHOUT TIME ZONE > TIME WITH TIME ZONE > TIMESTAMP WITHOUT TIME ZONE > TIMESTAMP WITH TIME ZONE If you need to port from a system that used DATETIME as a type name, consider defining DATETIME as a domain over whichever of the standard types seems to have the closest semantics (likely the last of these). regards, tom lane