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
> 
> I guess we don't want to get too carried away with this, but has
> anyone else gotten annoyed by this?

Why do you go through text and concatenation?  I advocate this approach:
        the_int * interval '1 second'

I haven't measured it though.

-- 
Álvaro Herrera <alvhe...@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to