Re: Is DATETIME an ANSI-SQL type?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magne Mæhre <Magne(dot)Mahre(at)Sun(dot)COM>
Cc: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Is DATETIME an ANSI-SQL type?
Date: 2008-01-15 15:53:32
Message-ID: 24168.1200412412@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?ISO-8859-1?Q?Magne_M=E6hre?= <Magne(dot)Mahre(at)Sun(dot)COM> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message John Hasler 2008-01-15 16:37:32 Re: UTF8 encoding and non-text data types
Previous Message Colin Wetherbee 2008-01-15 14:03:14 Re: JOIN a table twice for different values in the same query