Robert Haas writes:
> 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
No, the standard solution is
the_int * '1 second'::interval
On Fri, Oct 22, 2010 at 4:27 PM, Alvaro Herrera
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
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
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
On Fri, Oct 22, 2010 at 3:20 PM, Brendan Jurd wrote:
> On 23 October 2010 06:15, Josh Berkus wrote:
>> a) you'd need to rename these.
>
> I'm open to that. What names would you propose?
>
>> b) we'd also want the inverse of these, which would be extremely useful.
>
> Not a problem.
Ooh, I like
On 23 October 2010 06:15, Josh Berkus wrote:
> a) you'd need to rename these.
I'm open to that. What names would you propose?
> b) we'd also want the inverse of these, which would be extremely useful.
Not a problem.
Cheers,
BJ
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql
Brendan,
> date(year int, month int, day int) returns date
> datetime(year int, month int, day int, hour int, minute int, second
> int) returns timestamp
a) you'd need to rename these.
b) we'd also want the inverse of these, which would be extremely useful.
> Without these functions (or some var
On 23 October 2010 05:58, Peter Geoghegan wrote:
> On 22 October 2010 19:45, Brendan Jurd wrote:
>> Without these functions (or some variation), a user wishing to
>> construct a date from integers can only assemble the date into a
>> string and then put that string through postgres' datetime pars
On Fri, Oct 22, 2010 at 2:45 PM, Brendan Jurd wrote:
> date(year int, month int, day int) returns date
> datetime(year int, month int, day int, hour int, minute int, second
> int) returns timestamp
>
> Without these functions (or some variation), a user wishing to
> construct a date from integers
On 22 October 2010 19:45, Brendan Jurd wrote:
> Hi folks,
>
> In my own databases, I've been using a couple of C functions that
> might be useful to the wider community.
>
> They are very simple date/timestamp constructors that take integers as
> their arguments. Nothing fancy, but very convenien
Hi folks,
In my own databases, I've been using a couple of C functions that
might be useful to the wider community.
They are very simple date/timestamp constructors that take integers as
their arguments. Nothing fancy, but very convenient and *much* faster
than using a SQL or PL/pgSQL workaround
11 matches
Mail list logo