From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Brendan Jurd <direvus(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Integer input functions for date and timestamp |
Date: | 2010-10-22 20:28:00 |
Message-ID: | AANLkTimyvSkoZxN6d+hgDxQB7xZ6aJOyWk0mMxLfQt_0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 22, 2010 at 4:27 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Alvaro Herrera's message of vie oct 22 17:13:31 -0300 2010:
>> Excerpts from Robert Haas's message of vie oct 22 16:54:01 -0300 2010:
>>
>> > Ooh, I like it. A related personal pet peeve of mine: AFAIK the
>> > easiest way to convert from an integer number of seconds to an
>> > interval representing that many seconds is:
>> >
>> > (the_int || ' s')::interval
>>
>> Why do you go through text and concatenation? I advocate this approach:
>> the_int * interval '1 second'
>
> A quick tests with pgbench custom scripts says that it's about 10%
> faster.
Hmm, never thought of that approach.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-10-22 21:09:15 | Re: Extensions, this time with a patch |
Previous Message | Alvaro Herrera | 2010-10-22 20:27:14 | Re: Integer input functions for date and timestamp |