postgresql/src
Tom Lane 805fc21c33 Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input.
DecodeInterval() failed to honor the "range" parameter (the special SQL
syntax for indicating which fields appear in the literal string) if the
time was signed.  This seems inappropriate, so make it work like the
not-signed case.  The inconsistency was introduced in my commit
f867339c01, which as noted in its log message
was only really focused on making SQL-compliant literals work per spec.
Including a sign here is not per spec, but if we're going to allow it
then it's reasonable to expect it to work like the not-signed case.

Also, remove bogus setting of tmask, which caused subsequent processing to
think that what had been given was a timezone and not an hh:mm(:ss) field,
thus confusing checks for redundant fields.  This seems to be an aboriginal
mistake in Lockhart's commit 2cf1642461.

Add regression test cases to illustrate the changed behaviors.

Back-patch as far as 8.4, where support for spec-compliant interval
literals was added.

Range problem reported and diagnosed by Amit Kapila, tmask problem by me.
2012-08-03 17:39:50 -04:00
..
backend Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input. 2012-08-03 17:39:50 -04:00
bin Improve pg_dump's dependency-sorting logic to enforce section dump order. 2012-06-25 21:19:28 -04:00
include Fix whole-row Var evaluation to cope with resjunk columns (again). 2012-07-20 13:09:16 -04:00
interfaces Update copyright year in forgotten places 2012-06-19 21:36:08 +03:00
makefiles Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS. 2011-08-24 15:17:03 -04:00
pl Remove recently added PL/Perl encoding tests 2012-07-17 13:26:55 -04:00
port Improve reporting of error situations in find_other_exec(). 2012-07-27 19:31:24 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Fix bugs with parsing signed hh:mm and hh:mm:ss fields in interval input. 2012-08-03 17:39:50 -04:00
timezone Update time zone data files to tzdata release 2012c. 2012-05-31 00:48:04 -04:00
tools Fix MSVC builds broken by xsubpp change 2011-11-27 01:23:00 -05:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:27 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:50 -04:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00