Terry Lee Tucker <[EMAIL PROTECTED]> 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);

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to