Re: Interval Question
От | Tom Lane |
---|---|
Тема | Re: Interval Question |
Дата | |
Msg-id | 2653.1105467560@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Interval Question (Terry Lee Tucker <terry@esc1.com>) |
Ответы |
Re: Interval Question
|
Список | pgsql-general |
Terry Lee Tucker <terry@esc1.com> writes: > Apparently, if DateStyle is set to Sql, it always returns the absolute value. > Is this due to some Sql standard or is it a bug? It's a bug in interval_out. Looks like it gets it wrong for GERMAN style too. Surprising no one noticed before. (In any case, I dunno why you are parsing the textual output to discover whether an interval is negative...) regards, tom lane Soon-to-be-applied patch: *** src/backend/utils/adt/datetime.c.orig Fri Dec 31 17:46:13 2004 --- src/backend/utils/adt/datetime.c Tue Jan 11 13:13:30 2005 *************** *** 3932,3938 **** cp += strlen(cp); } ! if (is_before && (style == USE_POSTGRES_DATES)) { strcat(cp, " ago"); cp += strlen(cp); --- 3932,3938 ---- cp += strlen(cp); } ! if (is_before && (style != USE_ISO_DATES)) { strcat(cp, " ago"); cp += strlen(cp);
В списке pgsql-general по дате отправления: