Tom Lane [Sun, 18 Apr 1999 17:35:51 +0000 (17:35 +0000)]
After transforming a CASE expr with a default argument,
delete the default argument from the node. This prevents the executor
from spitting up on the untransformed argument expression. Typical
failure was:
select (case f1 when 'val' then 'subst' else f1 end) from t1;
ERROR: copyObject: don't know how to copy 704
Tom Lane [Sun, 18 Apr 1999 02:57:22 +0000 (02:57 +0000)]
Allow CREATE FUNCTION xyz AS '' LANGUAGE 'internal' to
work the way it used to (ie, assume xyz is the name of the builtin
function to call). Complain if an unknown builtin function name is
referenced.
Fix kill() call in elog() so that it gets its own pid by calling getpid().
MyProcPid global variable is set to 0 when postgres starts as a command
(not as a backend daemon). This leads issuing SIGQUIT to the process group,
not the process itself. As a result, parent sh gets core dumped in the
Wisconsin benchmark test.
Overhaul Wisconsin Benchmark test suit
- change temp -> temp_bench ("temp" is now a reserved word)
- fix bugs in queries
- add -B 256 option to run the postgres command
(without this, postgres seems to fail with hashjoin)
Fix max(int8) result by making sure int8larger() copies its result
rather than reusing the input storage.
Also made the same fix to int8smaller(), though there wasn't a symptom,
and went through and verified that other pass-by-reference data types
do the same thing. Not an issue for the by-value types.
Attached is new README.locale. Should go into .../doc. Includes
instructions on how to install and use Multibyte support. Primarily
oriented toward Russian (Cyrillic) users.
Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.
Tom Lane [Thu, 15 Apr 1999 04:08:07 +0000 (04:08 +0000)]
Initialize reltuples = 1000, relpages = 10 in a newly created
relation, rather than zeroes. This prevents the optimizer from making
foolish choices (ie, using nested-loop plans) on never-yet-vacuumed tables.
This is a hack, of course. Keeping accurate track of these statistics
would be a cleaner solution, but it's far from clear that it'd be worth
the cost of doing so. In any case we're not going to do that for 6.5.
In the meantime, this quick hack provides a useful performance improvement
in the regression tests and in many real-world scenarios.
Tom Lane [Thu, 15 Apr 1999 03:40:50 +0000 (03:40 +0000)]
Add ORDER BY clauses to some select-from-view operations
in rules regression test, in order to eliminate bogus test 'failures'
that occur due to platform-dependent and join-implementation-dependent
ordering of tuples. I'm not sure that I got all of the SELECTs that need
ordering clauses --- we may need some more. But this takes care of the
diffs between my platform and Jan's.
Tom Lane [Thu, 15 Apr 1999 02:24:41 +0000 (02:24 +0000)]
psql did the wrong thing with COPY FROM STDIN inside a file
sourced with \i (tried to read data from the terminal, rather than from
the source file; this breaks pg_dump scripts read with \i). Also, \o file
followed by COPY TO STDOUT wrote to terminal not designated file.
All better now.
Fix code to check legal dates *before* calling localtime() to get the
time zone.
Previously, localtime() rotated a date with a day of month field which
exceeded the actual range into the next months, masking the fact that
a bad date had been specified.
Regression tests pass.
Fix boolean assignment of return values to use "FALSE" rather than the
mis-copied "NULL", which happens to have the same binary value.
Previously, gcc gave non-fatal warnings.
Code modified to reject out of range day of month.
Previously, dates falling within Unix system time range were run through
a call to localtime() to get the time zone, if it was not specified.
This had the effect that dates with DOMs which were larger than would be
valid for that month were "rotated" into the following months.
Tom Lane [Wed, 14 Apr 1999 23:47:19 +0000 (23:47 +0000)]
pg_dump was trying to use an incorrect (or, perhaps, only obsolete?)
syntax for CREATE OPERATOR with SORT parameters. Fixed.
It is now actually possible to dump and reload a database containing
fully specified user-definable operators ...
Bruce Momjian [Tue, 13 Apr 1999 17:18:29 +0000 (17:18 +0000)]
There are some bugs about backward scanning using
indexes.
1. Index Scan using plural indexids never scan backward
as to the order of indexids.
2. The cursor using Index scan is not usable after moving
past the end.
This patch solves above bugs.
Moreover the change of _bt_first() would be useful to extend
ORDER BY patch by Jan Wieck for all descending order cases.
Tom Lane [Sun, 11 Apr 1999 02:30:59 +0000 (02:30 +0000)]
Repair problems seen when CREATE OPERATOR mentions a
not-yet-defined operator in commutator, negator, etc links. This is
necessary in order to ensure that a pg_dump dump of user-defined operators
can be reloaded. There may still be a bug lurking here, because it's
provoking a 'Buffer Leak' notice message in one case. See my mail to
pgsql-hackers.
Tom Lane [Sat, 10 Apr 1999 23:53:00 +0000 (23:53 +0000)]
Fix another batch of bogosities in pg_operator table.
These were bogus selectivity-estimator links, like a '>' operator
pointing to intltsel when it should use intgtsel.
Tom Lane [Wed, 7 Apr 1999 23:33:33 +0000 (23:33 +0000)]
Fix some more hashjoin-related bugs in pg_operator. Fix
hashjoin's hashFunc() so that it does the right thing with pass-by-value
data types (the old code would always return 0 for int2 or char values,
which would work but would slow things down a lot). Extend opr_sanity
regress test to catch more kinds of errors.
Tom Lane [Sat, 3 Apr 1999 22:57:29 +0000 (22:57 +0000)]
Give a better error message if an SQL-language function is
called through fmgr. Someday we should try to actually execute the function,
but that looks like it might be a major feature addition.
Not something to try during beta phase.
Tom Lane [Fri, 2 Apr 1999 05:10:16 +0000 (05:10 +0000)]
Remove overly presumptuous use of __STDC__ in c.h, replacing
it with configure-script tests to see whether const, inline, volatile, etc
work or not. (Curiously, configure was already doing the work to see if
const and inline were OK, but the results were not getting plugged into
config.h :-(.)
Tatsuo Ishii [Tue, 30 Mar 1999 05:00:42 +0000 (05:00 +0000)]
Bug fixes and enhances to psql submitted by Masaaki Sakaida
1. Fix problems of PAGER and \? command
2. Add -E option that shows actual queries sent by \dt and friends
3. Add version number in startup banners for psql
Tatsuo Ishii [Mon, 29 Mar 1999 09:00:19 +0000 (09:00 +0000)]
Addition to test/locale submitted by Oleg Broytmann. Comments from him:
There are two subdirectories (ISO8859-7 and koi8-to-win1251) containing
tests for Greek locale and server<=>client recoding feature (recently
submitted by Tatsuo Ishii <t-ishii@sra.co.jp>; we've debugged his patches
together in the field of Cyrillic support).
Tom Lane [Mon, 29 Mar 1999 01:30:45 +0000 (01:30 +0000)]
Modify fmgr so that internal name (compiler name) of a built-in
function is found in prosrc field of pg_proc, not proname. This allows
multiple aliases of a built-in to all be implemented as direct builtins,
without needing a level of indirection through an SQL function. Replace
existing SQL alias functions with builtin entries accordingly.
Save a few K by not storing string names of builtin functions in fmgr's
internal table (if you really want 'em, get 'em from pg_proc...).
Update opr_sanity with a few more cross-checks.
Vadim B. Mikheev [Sun, 28 Mar 1999 20:32:42 +0000 (20:32 +0000)]
1. Vacuum is updated for MVCC.
2. Much faster btree tuples deletion in the case when first on page
index tuple is deleted (no movement to the left page(s)).
3. Remember blkno of new root page in BTPageOpaque of
left/right siblings when root page is splitted.
Tom Lane [Fri, 26 Mar 1999 07:32:42 +0000 (07:32 +0000)]
Remove a bunch of dead entries exposed by findoidjoins crosschecks.
Apparently, whatever these things used to link to got recycled into
something else ... but the dependent entries didn't.