From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
Cc: | Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: INTERVAL representation |
Date: | 2000-11-07 14:45:29 |
Message-ID: | 3A081589.BD1A3108@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-11-07 15:09:11 | Re: AW: v7.0.3 *pre-release* ... |
Previous Message | Zeugswetter Andreas SB | 2000-11-07 14:44:43 | AW: v7.0.3 *pre-release* ... |