Re: time interval format srting - Mailing list pgsql-general

From Sam Mason
Subject Re: time interval format srting
Date
Msg-id 20081104200614.GS2459@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: time interval format srting  (Andreas Kretschmer <akretschmer@spamfence.net>)
List 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

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: time interval format srting
Next
From: Steve Atkins
Date:
Subject: Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?