Thanks for the answers. By the way, I'm not trying to parse the textual output to discover if it is netative. Apparently, I failed to communicate my purpose properly. I just want to return the value, regardless of netative or positive, to the user and store it in a column of type interval. I simply wanted it to show up as a netative value if the load is going to be late. Thanks for all the help... On Tuesday 11 January 2005 01:19 pm, Tom Lane saith: > Terry Lee Tucker <terry@xxxxxxxx> 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); -- Quote: 83 "Government is not the solution to our problem. Government is the problem." --Ronald Reagan Work: 1-336-372-6812 Cell: 1-336-363-4719 email: terry@xxxxxxxx ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match