Re: INTERVAL representation

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: INTERVAL representation
Дата
Msg-id 3A081589.BD1A3108@alumni.caltech.edu
обсуждение исходный текст
Ответ на INTERVAL representation  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
> Hmm, I started this reply planning on arguing that _keeping_ the 'ago'
> was easiest on my ears. Now I find I've talked myself into losing it,
> because it implies too much: 'ago' claims that that one end of the
> interval is 'now' and the other end is in the past. If what you've got
> is actually the difference between next Christmas and New Years:
> template1=# select ('25/12/2000'::timestamp - '01/01/2001'::timestamp)
>            as "deadtime";
>   deadtime
> -------------
>  7 00:00 ago
> (1 row)
> That seems just wrong.

I've removed the "ago convention" from the ISO interval format, but have
retained it for the "traditional Postgres" format. In the latter case,
the first numeric field is never negative, and the "ago", if present,
indicates a negative interval. Subsequent fields can have a positive or
negative sign, and if negative will indicate a sign flip relative to the
leading "ago-qualified" field.

The input interpretation of all of this is about the same as for 7.0.2,
though we now do a better job coping with more variations on the
"hh:mm:ss" style of representation.

Take a look at it and let me know what y'all think!
                   - Thomas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Horology regress test changed?
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Transaction ID wraparound: problem and proposed solution