Re: Best practice for specifying an interval

From: Rodrigo De Le� <rdeleonp(at)gmail(dot)com>
To: "Mark Morgan Lloyd" <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Best practice for specifying an interval
Date: 2007-09-24 13:17:37
Message-ID: a55915760709240617m3762ed93t4fd3f1ddad5da35c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/24/07, Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk> wrote:
> In a similar vein, are fractional hours best specified as
>
> select time '11:00' - interval '3 hour 45 minute';
>
> or as
>
> select time '11:00' - interval '3.75 hour';
>
> or with the interval converted to an integer number of minutes?

Pg is pretty smart for almost any case.

See:
http://www.postgresql.org/docs/8.2/static/datetime-appendix.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo De Le� 2007-09-24 13:21:49 Re: Transaction Steps!!
Previous Message Dawid Kuroczko 2007-09-24 12:44:32 DELETE FROM pg_class