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 7CBCB52D45 for ; Thu, 3 Mar 2005 06:41:16 +0000 (GMT) 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 52007-01 for ; Thu, 3 Mar 2005 06:41:06 +0000 (GMT) Received: from laughter.local (unknown [61.197.227.146]) by svr1.postgresql.org (Postfix) with ESMTP id A52A452A59 for ; Thu, 3 Mar 2005 06:41:05 +0000 (GMT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by laughter.local (Postfix) with ESMTP id 74AB84B6F67; Thu, 3 Mar 2005 15:41:03 +0900 (JST) In-Reply-To: <1109828560.27905.137.camel@bretsony> References: <1109780719.28180.86.camel@bretsony> <13089.1109793126@sss.pgh.pa.us> <1109794066.27857.100.camel@bretsony> <13466.1109795186@sss.pgh.pa.us> <1109828560.27905.137.camel@bretsony> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2bf00b6e6300e2c76bc3c09fa89e7913@myrealbox.com> Content-Transfer-Encoding: 7bit Cc: postgresql sql list From: Michael Glaesemann Subject: Re: definative way to place secs from epoc into timestamp Date: Thu, 3 Mar 2005 15:41:00 +0900 To: Bret Hughes X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/35 X-Sequence-Number: 20514 On Mar 3, 2005, at 14:42, Bret Hughes wrote: > also my first two pgsql functions :) > > cat ts2int.sql FWIW, there's a patch in the queue for 8.1 that adds a to_timestamp function that converts between Unix epoch and timestamp with time zone. http://momjian.postgresql.org/cgi-bin/pgpatches2 Doesn't help you now, but it'll be there in the future. Michael Glaesemann grzm myrealbox com