Re: Revisiting extract(epoch from timestamp)
| От | Tom Lane |
|---|---|
| Тема | Re: Revisiting extract(epoch from timestamp) |
| Дата | |
| Msg-id | 12254.1334001384@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Revisiting extract(epoch from timestamp) (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-hackers |
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of lun abr 09 15:38:21 -0300 2012:
>> 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.
> You mean, having the constraint declaration rotate the timestamptz
> column to timestamp and then extract the epoch from that? If you go
> that route, then the queries that wish to take advantage of constraint
> exclusion would have to do likewise, which becomes ugly rather quickly.
No, I'm wondering why the partition constraints wouldn't just be
tstzcol >= '2012-04-01 00:00' and tstzcol < '2012-05-01 00:00'
or similar. What sort of constraint have you got in mind that is more
naturally expressed involving extract(epoch)? (And will the planner
think so too?)
regards, tom lane
В списке pgsql-hackers по дате отправления: