postgresql/src
Tom Lane c62b8eaae1 Fix edge-case behavior of pg_next_dst_boundary().
Due to rather sloppy thinking (on my part, I'm afraid) about the
appropriate behavior for boundary conditions, pg_next_dst_boundary() gave
undefined, platform-dependent results when the input time is exactly the
last recorded DST transition time for the specified time zone, as a result
of fetching values one past the end of its data arrays.

Change its specification to be that it always finds the next DST boundary
*after* the input time, and adjust code to match that.  The sole existing
caller, DetermineTimeZoneOffset, doesn't actually care about this
distinction, since it always uses a probe time earlier than the instant
that it does care about.  So it seemed best to me to change the API to make
the result=1 and result=0 cases more consistent, specifically to ensure
that the "before" outputs always describe the state at the given time,
rather than hacking the code to obey the previous API comment exactly.

Per bug #6605 from Sergey Burladyan.  Back-patch to all supported versions.
2012-04-25 17:26:10 -04:00
..
backend Another trivial comment-typo fix. 2012-04-25 14:28:58 -04:00
bin Lots of doc corrections. 2012-04-23 22:43:09 -04:00
include Remove prototype for nonexistent function. 2012-04-25 15:32:15 -04:00
interfaces Lots of doc corrections. 2012-04-23 22:43:09 -04:00
makefiles pgxs: Supply default values for BISON and FLEX variables 2012-03-30 20:36:49 +03:00
pl PL/Python: Improve error messages 2012-04-25 21:11:59 +03:00
port Remove now redundant pgpipe code. 2012-03-28 23:24:07 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Casts to or from a domain type are ignored; warn and document. 2012-04-24 09:20:53 -04:00
timezone Fix edge-case behavior of pg_next_dst_boundary(). 2012-04-25 17:26:10 -04:00
tools entab: Improve makefile 2012-04-24 21:20:55 +03:00
tutorial Update copyright notices for year 2012. 2012-01-01 18:01:58 -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 Lots of doc corrections. 2012-04-23 22:43:09 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
nls-global.mk Lots of doc corrections. 2012-04-23 22:43:09 -04:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00