Re: time interval format srting

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: time interval format srting
Date: 2008-11-04 20:06:14
Message-ID: 20081104200614.GS2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andreas Kretschmer replied:
> I wrote:
> > How about doing:
> >
> > SELECT justify_interval(90061 * '1 second'::INTERVAL);
>
> Nice, didn't know this function.

Yup, PG does everything! Not sure when I discovered it; also not sure
if I've ever had to use it in anger before. I am, however, slightly
embarrassed that I used the ugly form of interval literals, it looks
prettier to me as:

SELECT justify_interval(90061 * INTERVAL '1 second');

Ah well!

Sam

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2008-11-04 20:07:17 Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?
Previous Message Andreas Kretschmer 2008-11-04 19:57:26 Re: time interval format srting