X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CA5D4D7C4A for ; Tue, 13 Sep 2005 05:47:56 -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 97781-01 for ; Tue, 13 Sep 2005 08:47:38 +0000 (GMT) Received: from moon.antora.ru (moon.antora.ru [83.222.21.34]) by svr1.postgresql.org (Postfix) with ESMTP id 6E7DCD6D85 for ; Tue, 13 Sep 2005 05:47:38 -0300 (ADT) Received: from [217.26.17.26] (helo=[10.0.0.72]) by moon.antora.ru with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.51 (FreeBSD)) id 1EF6S2-000G2S-Ox; Tue, 13 Sep 2005 12:47:39 +0400 Message-ID: <43269192.2060603@bankir.ru> Date: Tue, 13 Sep 2005 12:45:06 +0400 From: "Eugene E." User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050517) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wei Cc: pgsql-sql@postgresql.org Subject: Re: How do I convert an integet to a timestamp? References: <1126548068.702382.67260@z14g2000cwz.googlegroups.com> In-Reply-To: <1126548068.702382.67260@z14g2000cwz.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.091 required=5 tests=[AWL=0.091] X-Spam-Level: X-Archive-Number: 200509/144 X-Sequence-Number: 22691 Wei wrote: > Hi. > > I followed the doc and tried "select CAST(1126547334 AS timestamp)" and > I only got an error response that says: ERROR: cannot cast type > integer to timestamp without time zone. > > What is the proper way to do the conversion? select 123456789::abstime::timestamp;