Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D16B36350CC for ; Tue, 19 May 2009 06:57:33 -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 69963-09 for ; Tue, 19 May 2009 06:57:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.ptn-ipout01.plus.net (relay.ptn-ipout01.plus.net [212.159.7.35]) by mail.postgresql.org (Postfix) with ESMTP id A06386350C4 for ; Tue, 19 May 2009 06:57:32 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwEAIofEkrUnw6T/2dsb2JhbACYUrU5hAEF Received: from ptb-relay03.plus.net ([212.159.14.147]) by relay.ptn-ipout01.plus.net with ESMTP; 19 May 2009 10:57:29 +0100 Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay03.plus.net with esmtp (Exim) id 1M6M4e-0003ri-MY; Tue, 19 May 2009 10:57:28 +0100 Received: from dell36.office.archonet.com (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 70EB1274049; Tue, 19 May 2009 10:57:28 +0100 (BST) Message-ID: <4A128288.8090304@archonet.com> Date: Tue, 19 May 2009 10:57:28 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Sebastien FLAESCH , PgSql General 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> <4A128178.3090508@4js.com> In-Reply-To: <4A128178.3090508@4js.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Plusnet-Relay: f7d7e18d48ecc2377492230f3b9f6de0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200905/626 X-Sequence-Number: 147764 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) > ... etc ... > > ... > > If PostgreSQL is not able to store months > 11, hours > 23 and minutes > or seconds > 59 Well, it's not storage it's formatting. Doesn't make any difference to your problem though. >, it looks like I will need to deal with PostgreSQL's > > INTERVAL YEAR TO MONTH > INTERVAL DAY TO SECOND(5) > > ... and make conversions, to store all possible Informix INTERVALs... If you know a little "C" you could build some custom types to match your needs. It should just be a matter of applying the correct formatting as a wrapper around the existing "interval" type. -- Richard Huxton Archonet Ltd