pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Bailey <artacus@comcast.net>
To: pgsql-general@postgresql.org
Subject: Re: INTERVAL SECOND limited to 59 seconds?
Date: Tue, 19 May 2009 23:42:27 -0700
Message-ID: <4A13A653.8090702@comcast.net> (raw)
In-Reply-To: <4A1281A7.7010000@4js.com>
References: <4A127038.3010103@4js.com>
	<4A12737F.1020207@archonet.com>
	<4A127919.7080105@4js.com>
	<4A127C2E.1020701@archonet.com>
	<4A1281A7.7010000@4js.com>

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.



view thread (8+ messages)  latest in thread

Message-ID: <4A13A653.8090702@comcast.net>
Permalink:  ../4A13A653.8090702@comcast.net/
Also on:    postgresql.org/message-id/4A13A653.8090702@comcast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: artacus@comcast.net, pgsql-general@postgresql.org
  Subject: Re: INTERVAL SECOND limited to 59 seconds?
  In-Reply-To: <4A13A653.8090702@comcast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox