Re: Revisiting extract(epoch from timestamp)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, hubert depesz lubaczewski <depesz(at)depesz(dot)com>
Subject: Re: Revisiting extract(epoch from timestamp)
Date: 2012-04-09 18:38:21
Message-ID: 11131.1333996701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> If somebody needs it I'd probably be in favor of doing it. I'm not
>>> sure I'd do it on spec.

> It would be useful to have a simple function to use with timestamp in
> constraint exclusion without having to use contorted expressions ...
> An immutable extract_epoch(timestamptz) would fit the bill.

What exactly would you do with it there that you couldn't do more easily
and clearly with plain timestamp comparisons? I'm willing to be
convinced, but I want to see a case where it really is the best way.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-04-09 18:42:24 Re: bug in fast-path locking
Previous Message Andrew Dunstan 2012-04-09 18:35:47 Re: Regarding column reordering project for GSoc 2012