From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Jim Nasby <jim(at)nasby(dot)net>, Vik Reykja <vikreykja(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Inputting relative datetimes |
Date: | 2011-08-27 11:43:57 |
Message-ID: | CAEZATCVfrtXr-vWGHnv54w=J7E7PL6jTno=JQ_oD8aY6=VJgBg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 27 August 2011 12:29, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> ... if nothing else it has been a
> fun exercise figuring out how the datetime string parsing code works.
>
While looking through the current code, I spotted the following oddity:
select timestamp 'yesterday 10:30';
timestamp
---------------------
2011-08-26 10:30:00
which is what you'd expect, however:
select timestamp '10:30 yesterday';
timestamp
---------------------
2011-08-26 00:00:00
Similarly "today" and "tomorrow" reset any time fields so far, but
ISTM that they should really be preserving the hour, min, sec fields
decoded so far.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-08-27 13:01:52 | Re: -Wformat-zero-length |
Previous Message | Peter Eisentraut | 2011-08-27 11:33:27 | limit in subquery causes poor selectivity estimation |