Commit Graph

5470 Commits

Author SHA1 Message Date
Tom Lane 91f82de48a Assign sort keys properly when there are duplicate entries in
pathkey list --- corrects misbehavior seen with multiple mergejoin clauses
mentioning same variable.
1999-08-16 23:07:20 +00:00
Bruce Momjian 55179388f9 Typo fix 1999-08-16 20:32:34 +00:00
Bruce Momjian 972124091d 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.

Oleg.
1999-08-16 20:27:19 +00:00
Bruce Momjian c5d0a1bc42 Fix for perl5 on BSD/OS. 1999-08-16 20:12:12 +00:00
Bruce Momjian aa2cc6ebbe Change >& to > and 2>&1. 1999-08-16 19:59:25 +00:00
Bruce Momjian e69a997d02 Allow BSD yacc and bison to compile pl code. 1999-08-16 19:57:21 +00:00
Tom Lane e6381966c1 Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars).  This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases.  I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
1999-08-16 02:17:58 +00:00
Tom Lane 08320bfb22 Small updates to #include lists for pending optimizer checkin. 1999-08-16 02:10:13 +00:00
Tom Lane c9b128fcdb Move funcid_get_rettype() to lsyscache. 1999-08-16 02:08:59 +00:00
Tom Lane b1baf1ff60 Add get_func_rettype() to general-use lsyscache routines,
since it's now needed in both optimizer and parser.
1999-08-16 02:06:25 +00:00
Tatsuo Ishii bab13a70ff Fix for Win32 making problem with MB enabled.
Patches created by Hiroki Kataoka.
1999-08-16 02:04:05 +00:00
Thomas G. Lockhart 3cfd56fcf6 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.
1999-08-15 06:46:49 +00:00
Tom Lane 288373f5a4 LispUnion fix changes output ordering for inheritance tests. 1999-08-14 19:30:21 +00:00
Tom Lane 51e29a2be3 LispUnion routine didn't generate a proper union: anytime
l2 contained more than one entry, there would be duplicates in the output
list.  Miscellaneous code beautification in other routines, too.
1999-08-14 19:29:35 +00:00
Bruce Momjian 448d1ab0ad Update TODO list. 1999-08-13 16:56:04 +00:00
Tom Lane 47f18ec702 Update comments about pathkeys. 1999-08-13 01:17:16 +00:00
Tom Lane 8f9f6e51a8 Clean up optimizer's handling of indexscan quals that need to be
commuted (ie, the index var appears on the right).  These are now handled
the same way as merge and hash join quals that need to be commuted: the
actual reversing of the clause only happens if we actually choose the path
and generate a plan from it.  Furthermore, the clause is only reversed in
the 'indexqual' field of the plan, not in the 'indxqualorig' field.  This
allows the clause to still be recognized and removed from qpquals of upper
level join plans.  Also, simplify and generalize match_clause_to_indexkey;
now it recognizes binary-compatible indexes for join as well as restriction
clauses.
1999-08-12 04:32:54 +00:00
Tom Lane aae034d28c Add commentary to show that even though ExecInitIndexScan()
contains much code that looks like it will handle indexquals with the index
key on either side of the operator, in fact indexquals must have the index
key on the left because of limitations of the ScanKey machinery.  Perhaps
someone will be motivated to fix that someday...
1999-08-12 00:42:43 +00:00
Bruce Momjian 6075717df0 Update TODO list. 1999-08-10 16:56:54 +00:00
Tom Lane 2ae51c86c9 Minor cleanups and code beautification; eliminate some
routines that are now dead code.
1999-08-10 03:00:15 +00:00
Tom Lane 4a1c5cb953 Revise create_nestloop_node's handling of inner indexscan to
work under a wider range of scenarios than it did --- it formerly did not
handle a multi-pass inner scan, nor cases in which the inner scan's
indxqualorig or non-index qual contained outer var references.  I am not
sure that these limitations could be hit in the existing optimizer, but
they need to be fixed for future expansion.
1999-08-10 02:58:56 +00:00
Bruce Momjian 158fd5f1c4 > > Prevent sorting if result is already sorted
> >
> > was implemented by Jan Wieck.
> > His work is for ascending order cases.
> >
> > Here is a patch to prevent sorting also in descending
> > order cases.
> > Because I had already changed _bt_first() to position
> > backward correctly before v6.5,this patch would work.
> >
Hiroshi Inoue
Inoue@tpf.co.jp
1999-08-09 06:20:27 +00:00
Tom Lane 5efe31214a Clean up tlist.c tree-walking routines with
expression_tree_mutator.
1999-08-09 05:34:13 +00:00
Tom Lane 14f84cd821 Store -1 in attdisbursion to signal 'no duplicates in column'.
Centralize att_disbursion readout logic.
1999-08-09 03:16:47 +00:00
Tom Lane 5af4b04f31 Move get_attdisbursion to lsyscache. Clean up get_typdefault. 1999-08-09 03:13:31 +00:00
Tom Lane e9054829a2 Update comments about attdisbursion. NO code change. 1999-08-09 02:45:56 +00:00
Vadim B. Mikheev 1ecb43a40c Re-use free space on index pages with duplicates. 1999-08-09 01:39:19 +00:00
Tom Lane 10d6d411a8 Rewrite fix_indxqual_references, which was entirely bogus for
multi-scan indexscan plans; it tried to use the same table-to-index
attribute mapping for all the scans, even if they used different indexes.
It would klugily work as long as OR indexquals never used multikey indexes,
but that's not likely to hold up much longer...
1999-08-09 01:01:42 +00:00
Tom Lane ecef2caae9 Clean up routines in setrefs.c by replacing individual tree
walking logic with expression_tree_walker/mutator calls.
1999-08-09 00:56:05 +00:00
Tom Lane 6bc601b648 Create a standardized expression_tree_mutator support routine
to go along with expression_tree_walker.  (_walker is not suitable for
routines that need to alter the tree structure significantly.)  Other minor
cleanups in clauses.c.
1999-08-09 00:51:26 +00:00
Bruce Momjian f0b651ac6b replace #Include . 1999-08-09 00:08:52 +00:00
Tom Lane 4488b69b4c Fix nbtree's failure to clear BTScans list during xact abort.
Also, move responsibility for calling vc_abort into main xact.c list of
things-to-call-at-abort.  What in the world was it doing down inside of
TransactionIdAbort()?
1999-08-08 20:12:52 +00:00
Tom Lane fb491a5854 For a unique-key attribute (no duplicate values), vacuum analyze
was recording a disbursion of 0, not the correct value 1/numberOfRows.
1999-08-08 17:13:10 +00:00
Thomas G. Lockhart a76ad509fe Remove old man pages. All info is in new man pages or other docs. 1999-08-08 15:21:50 +00:00
Thomas G. Lockhart d0a1919852 Use sgml/Makefile to generate man sections, so just "make man" there. 1999-08-08 15:10:21 +00:00
Thomas G. Lockhart 7af929cd79 Switch from old man pages to new ones generated from sgml. 1999-08-08 15:09:04 +00:00
Thomas G. Lockhart 13d1a3c06d Remove emacs properties block from end of file. 1999-08-08 15:05:22 +00:00
Thomas G. Lockhart c9ff1a5a75 Update references to char2 type by using char(2).
Thanks to Garr Updegraff <garru@uci.edu> for the tip.
1999-08-08 04:21:33 +00:00
Thomas G. Lockhart f11bdb9db5 Allow nsgmls to validate input by defining the document type.
Use refentry.sgml as a generic header for man pages through nsgmls.
1999-08-08 04:18:29 +00:00
Bruce Momjian 4cddd482c1 Fix so BSD yacc works on file. 1999-08-07 04:25:02 +00:00
Thomas G. Lockhart c879556780 Fix markup to allow clean man pages.
Add new pages for programming languages and tcl shells.
1999-08-06 13:50:31 +00:00
Thomas G. Lockhart 6b07527721 Fix cross-reference markup so that only the *title* of the Operators
chapter is included, not the chapter itself.
Thanks to Evelyn Mitchell <efm@tummy.com> for pointing it out.
1999-08-06 13:48:38 +00:00
Thomas G. Lockhart 777a4f71f0 Remove explicit references to ref/ path in file names; use vpath instead.
Fix rules for man pages to ensure double-pass to get cross references.
Add a few new man pages.
1999-08-06 13:46:17 +00:00
Thomas G. Lockhart 4f1766f1ea Try to clarify characteristics of the SERIAL type.
Fix source indenting, which does not affect output.
Note: still need docs on NUMERIC and DECIMAL
 (and let's not talk about regression tests :()
1999-08-06 13:43:42 +00:00
Tom Lane e1fad50a5d Revise generation of hashjoin paths: generate one path per
hashjoinable clause, not one path for a randomly-chosen element of each
set of clauses with the same join operator.  That is, if you wrote
   SELECT ... WHERE t1.f1 = t2.f2 and t1.f3 = t2.f4,
and both '=' ops were the same opcode (say, all four fields are int4),
then the system would either consider hashing on f1=f2 or on f3=f4,
but it would *not* consider both possibilities.  Boo hiss.
Also, revise estimation of hashjoin costs to include a penalty when the
inner join var has a high disbursion --- ie, the most common value is
pretty common.  This tends to lead to badly skewed hash bucket occupancy
and way more comparisons than you'd expect on average.
I imagine that the cost calculation still needs tweaking, but at least
it generates a more reasonable plan than before on George Young's example.
1999-08-06 04:00:17 +00:00
Tom Lane b7883d7e3a parse_coerce fix allows early simplification of one
constant-coercion expression in the rules test.
1999-08-05 02:35:29 +00:00
Tom Lane fd19a350ea Revise parse_coerce() to handle coercion of int and float
constants, not only string constants, at parse time.  Get rid of
parser_typecast2(), which is bogus and redundant...
1999-08-05 02:33:54 +00:00
Bruce Momjian 5a76a94e41 Update TODO list. 1999-08-05 01:53:35 +00:00
Tom Lane b15a7c9fbe Fix ELF test so it doesn't spit up on all non-ELF systems...
use Autoconf-approved method of testing for predefined symbols, and move
it down to where we know what compiler to run and how to run it.
1999-08-03 00:09:32 +00:00
Tom Lane b0984e6995 Add a VACUUM command in hopes of making pg_upgrade usable again
in MVCC environment.  I do not trust this until Vadim says it's OK...
1999-08-02 22:34:53 +00:00