Thread: pgsql-server/ oc/src/sgml/datatype.sgml rc/bac ...
pgsql-server/ oc/src/sgml/datatype.sgml rc/bac ...
From
momjian@svr1.postgresql.org (Bruce Momjian)
Date:
CVSROOT: /cvsroot Module name: pgsql-server Changes by: momjian@svr1.postgresql.org 03/12/20 11:32:55 Modified files: doc/src/sgml : datatype.sgml src/backend/commands: variable.c src/backend/utils/adt: datetime.c src/include : miscadmin.h src/interfaces/ecpg/pgtypeslib: dt.h dt_common.c interval.c Log message: In my mind there were two categories of open issues a) ones that are 100% backward (such as the comment about outputting this format) and b) ones that aren't (such as deprecating the current postgresql shorthand of '1Y1M'::interval = 1 year 1 minute in favor of the ISO-8601 'P1Y1M'::interval = 1 year 1 month. Attached is a patch that addressed all the discussed issues that did not break backward compatability, including the ability to output ISO-8601 compliant intervals by setting datestyle to iso8601basic. Interval values can now be written as ISO 8601 time intervals, using the "Format with time-unit designators". This format always starts with the character 'P', followed by a string of values followed by single character time-unit designators. A 'T' separates the date and time parts of the interval. Ron Mayer
momjian@svr1.postgresql.org (Bruce Momjian) writes: > Attached is a patch that addressed all the discussed issues that > did not break backward compatability, Was this patch actually agreed to? I hadn't gotten around to looking at it because I thought Peter was still objecting to the whole idea. > including the ability to > output ISO-8601 compliant intervals by setting datestyle to > iso8601basic. This is a horrid, horrid idea. Datestyle is already a complete mess because it is being used to control several things; it should have been two or possibly three GUC variables not one. Sticking in yet another behavior is just not acceptable IMHO, especially when it's defined as non-orthogonally as that. Please revert that part of the patch and instead invent a new GUC variable that's specifically for interval formatting. BTW, I can tell without looking that the patch is deficient in documentation; if it has effects on GUC variables, why is there no mod in runtime.sgml? regards, tom lane