Repair two recently reported problems:
1) datetime_pl_span() added the seconds field before adding the months
field. This lead to erroneous results for e.g.
select datetime '1999-11-30' + timespan '1 mon - 1 sec';
Reverse the order of operations to add months first.
2) tm2timespan() did all intermediate math as integer, converting to double
at the very end. This resulted in hidden overflows when given very large
integer days, hours, etc. For example,
select '74565 days'::timespan;
produced the wrong result. Change code to ensure that doubles are used
for intermediate calculations.
Thanks to Olivier PRENANT <ohp@pyrenet.fr> and
Tulassay Zsolt <zsolt@tek.bke.hu> for problem reports and to Tom Lane for
accurate analyses.
Bruce Momjian [Tue, 12 Oct 1999 14:55:01 +0000 (14:55 +0000)]
I have created a small patch that makes possible to compile pgsql on newer
Cygwin snapshots (tested on 990115 which is recommended to use - it fixes
some errors in B20.1)
And I have another patch for including <sys/ipc.h> before <sys/sem.h> in
backend/storage/lmgr/proc.c - it is required due the design of cygipc
headers
Fix the omitted declarations to allow '^' and '|' as math operators.
Problem was introduced when precedence was added for these.
How did *those* changes get into the stable tree in the first place??
Bruce Momjian [Thu, 23 Sep 1999 19:13:55 +0000 (19:13 +0000)]
Backpatch into 6.5.*.
One last missing quoting bug in pg_dump:
now that sequence names are properly quoted for field defaults, mixed
case sequence names are generated. These are properly quoted in the
CREATE SEQUENCE lines, but not in the SELECT nextval lines, as per
below:
Tom Lane [Tue, 14 Sep 1999 22:33:35 +0000 (22:33 +0000)]
Another little 'must fix' for 6.5.2: someone removed HAVE_KILL
from the configuration symbols, but neglected to remove #ifdef HAVE_KILL
from async.c in the REL6_5 branch. Result: cross-backend NOTIFY dead in
the water.
Allow CASE statement to contain *only* untyped result clauses or nulls.
Almost worked before, but forgot one place to check.
Reported by Tatsuo Ishii.
Still does not do the right thing if inserting into a non-string target
column. Should look for a type coersion later, but doesn't.
Tom Lane [Thu, 9 Sep 1999 16:29:22 +0000 (16:29 +0000)]
Repair incorrect cleanup of heap memory allocation during
transaction abort --- before it only worked if there was exactly one level
of allocation context stacked in the blank portal. Now it does the right
thing for any depth, including zero...
Tom Lane [Mon, 6 Sep 1999 20:00:15 +0000 (20:00 +0000)]
Comment out FileUnlink of excess segments during mdtruncate().
This is unsafe in 6.5 because other backends may be able to access the file
before noticing the shared cache inval message that tells 'em to re-open
the file. We have fixed this for 6.6 but the changes seem too risky to
back-patch for 6.5.2.
Also, back-patch Tatsuo's change to prevent creation of files during
mdopen().
Tom Lane [Sun, 29 Aug 1999 19:22:28 +0000 (19:22 +0000)]
Backpatch rule deparsing bugfixes into 6.5.*.
I believe this is a pretty critical bugfix, since without it, stored rules
containing CASE expressions or array references cannot be dumped by pg_dump.
Worse, rules containing expressions like (a + b) * c will be dumped
incorrectly (minus the parentheses, silently yielding the wrong answer...).
Tom Lane [Sun, 29 Aug 1999 01:39:57 +0000 (01:39 +0000)]
Back-patch fix for timestamp(datetime) into 6.5.*.
I believe this is not a violation of our policy against requiring initdb
for minor-version bugfixes, since users don't *have* to initdb; they
just won't see any effect from the fix if they don't. But a user who
does do a clean install or initdb upgrade to 6.5.2 will get the fix,
and that seems worthwhile.
Tatsuo Ishii [Wed, 25 Aug 1999 11:32:52 +0000 (11:32 +0000)]
Add new vpl_num_allocated_pages member to VPageListData.
It will keep track the number of pages allocated so that
vacuum could allocate twice of the previous allocation.
This will greatly reduce the total memory consumption of
vacuum.
Bruce Momjian [Mon, 16 Aug 1999 20:29:11 +0000 (20:29 +0000)]
I've sent 3 mails to pgsql-patches. There are two files, one for doc
and
for src/data directories, and one minor patch for doc/README.locale.
Please apply.
Repair the check for redundant UNIQUE and PRIMARY KEY indices.
Also, improve it so that it checks for multi-column constraints.
Thanks to Mark Dalphin <mdalphin@amgen.com> for reporting the problem.
I didn't see any further discussion so here is, I hope, a clean fix to
configure.in to determine if a system is ELF or not. Note that some
of the tests earlier may be redundant but I took the safest route.