Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1EEE163243E for ; Wed, 20 May 2009 03:42:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47852-04 for ; Wed, 20 May 2009 03:42:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from QMTA14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mail.postgresql.org (Postfix) with ESMTP id C043A6322D3 for ; Wed, 20 May 2009 03:42:30 -0300 (ADT) Received: from OMTA07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by QMTA14.emeryville.ca.mail.comcast.net with comcast id tiDS1b0031GXsucAEiiWte; Wed, 20 May 2009 06:42:30 +0000 Received: from [192.168.10.75] ([24.18.59.220]) by OMTA07.emeryville.ca.mail.comcast.net with comcast id tiiV1b0084l5pfc8TiiVff; Wed, 20 May 2009 06:42:30 +0000 Message-ID: <4A13A653.8090702@comcast.net> Date: Tue, 19 May 2009 23:42:27 -0700 From: Scott Bailey User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: INTERVAL SECOND limited to 59 seconds? References: <4A127038.3010103@4js.com> <4A12737F.1020207@archonet.com> <4A127919.7080105@4js.com> <4A127C2E.1020701@archonet.com> <4A1281A7.7010000@4js.com> In-Reply-To: <4A1281A7.7010000@4js.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/695 X-Sequence-Number: 147832 Sebastien FLAESCH wrote: > Actually it's not limited to the usage of INTERVAL SECOND, I am writing > a PostgreSQL driver for our 4GL virtual machine... > > I need to store all possible Informix INTERVAL types such as: > > INTERVAL MONTH(8) TO MONTH > INTERVAL DAY(8) TO MINUTE > INTERVAL SECOND TO FRACTION(5) In Postgres, you should just store it as an INTERVAL which (unlike some other RDBMS') has the ability to store ranges from fractional seconds to thousands of years. Then if you need to output it in the above format, make a view that splits the actual interval into month, minute and fractional second pieces.