postgresql/src
Tom Lane bac65d5240 Fix datetime input to behave correctly for Feb 29 in years BC.
Formerly, DecodeDate attempted to verify the day-of-the-month exactly, but
it was under the misapprehension that it would know whether we were looking
at a BC year or not.  In reality this check can't be made until the calling
function (eg DecodeDateTime) has processed all the fields.  So, split the
BC adjustment and validity checks out into a new function ValidateDate that
is called only after processing all the fields.  In passing, this patch
makes DecodeTimeOnly work for BC inputs, which it never did before.

(The historical veracity of all this is nonexistent, of course, but if
we're going to say we support proleptic Gregorian calendar then we should
do it correctly.  In any case the unpatched code is broken because it could
emit dates that it would then reject on re-inputting.)

Per report from Bernd Helmle.  Back-patch as far as 8.0; in 7.x we were
not using our own calendar support and so this seems a bit too risky
to put into 7.4.
2008-02-25 23:21:22 +00:00
..
backend Fix datetime input to behave correctly for Feb 29 in years BC. 2008-02-25 23:21:22 +00:00
bin Fix mistakes in pg_ctl's code for "start -w" that tries to cope with 2008-02-20 22:18:35 +00:00
include Stamp release 8.1.11. 2008-01-03 21:41:24 +00:00
interfaces Fix an ancient oversight in libpq's handling of V3-protocol COPY OUT mode: 2008-01-14 18:46:33 +00:00
makefiles Add $(CFLAGS) to the simplified build rule for .so libraries on Darwin. 2006-11-28 05:47:16 +00:00
pl Work around for perl 5.10 bug - fix due to perl hacker Simon Cozens. 2008-01-22 20:41:39 +00:00
port Stamp release 8.1.11. 2008-01-03 21:41:24 +00:00
template SUNOS4_CC -> SUNOS_CC. 2005-07-30 03:07:42 +00:00
test Repair problems occurring when multiple RI updates have to be done to the same 2007-08-15 19:16:04 +00:00
timezone Update time zone data files to tzdata release 2007k. 2008-01-01 20:45:25 +00:00
tools Stamp 8.1.4, except configure/configure.in. 2006-05-19 03:57:17 +00:00
tutorial Use SQL standard '' rather than \' for tutorial/sample code. 2006-05-11 19:21:31 +00:00
utils PostgreSQL extension makefile framework ("pgxs"), by Fabien Coelho, with 2004-07-30 12:26:40 +00:00
bcc32.mak Add -N make flag to bcc builds from /src dir. 2005-05-13 18:12:35 +00:00
DEVELOPERS just testing a script... 1999-07-30 03:45:57 +00:00
Makefile Adjust src/tutorial Makefile so that it can use pgxs. This allows the 2005-01-13 18:23:22 +00:00
Makefile.global.in Fix problems with PGXS builds against an installation tree that was 2005-09-27 17:39:35 +00:00
Makefile.shlib Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. 2005-12-03 20:16:39 +00:00
nls-global.mk More locale fixes for pg_ctl. 2004-06-01 03:32:42 +00:00
win32.mak Attached is a makefile I hacked up to build pg_config under MSVC - the 2005-06-14 17:50:38 +00:00