summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Minor improvements to stringinfo package to make it moreTom Lane1999-08-315-46/+48
| | | | robust, since it's about to get used much more heavily.
* Fix quoting problems in mkMakefile.tcldefs.sh.in andTom Lane1999-08-293-11/+30
| | | | mkMakefile.tkdefs.sh.in.
* Correct broken entries for pg_proc OIDs 1364 (time(abstime))Tom Lane1999-08-291-3/+3
| | | | | | | | | and 1370 (timestamp(datetime)). This does not force an initdb, exactly, but you won't see the effects of the bug fix until you do one. BTW, OID 1358 for timespan(time) is still broken: select timespan('21:11:26'::time); ERROR: No such function 'time_timespan' with the specified attributes But I couldn't figure out what it ought to be defined as, so I left it be.
* Update rules test expected output to conform to slightlyTom Lane1999-08-281-51/+51
| | | | more verbose results from ruleutils.c changes.
* Fix several problems in rule deparsing: didn't handle arrayTom Lane1999-08-281-200/+199
| | | | | | | references or CASE expressions, didn't parenthesize complex expressions properly. Also, always output variable references as fully qualified names to eliminate ambiguity bug recently reported. (This could be smarter, but reliability comes first.)
* Clean up some mistakes in handling of uplevel Vars in planner.Tom Lane1999-08-266-34/+65
| | | | | | | Most parts of the planner should ignore, or indeed never even see, uplevel Vars because they will be or have been replaced by Params. There were a couple of places that got it wrong though, probably my fault from recent changes...
* Clean up some bugs in oper_select_candidate(), notably theTom Lane1999-08-261-24/+29
| | | | | | last loop which would return the *first* surviving-to-that-point candidate regardless of which one actually passed the test. This was producing such curious results as 'oid % 2' getting translated to 'int2(oid) % 2'.
* Revise implementation of SubLinks so that there is a consistent,Tom Lane1999-08-258-321/+325
| | | | | | | | | documented intepretation of the lefthand and oper fields. Fix a number of obscure problems while at it --- for example, the old code failed if the parser decided to insert a type-coercion function just below the operator of a SubLink. CAUTION: this will break stored rules that contain subplans. You may need to initdb.
* Fix vacuum's memory consumptionTatsuo Ishii1999-08-251-4/+11
|
* Add new vpl_num_allocated_pages member to VPageListData.Tatsuo Ishii1999-08-251-1/+2
| | | | | | | 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.
* Alter AllocSet routines so that requests larger thanTom Lane1999-08-242-69/+171
| | | | | | | | | | ALLOC_BIGCHUNK_LIMIT are always allocated as separate malloc() blocks, and are free()d immediately upon pfree(). Also, if such a chunk is enlarged with repalloc(), translate the operation into a realloc() so as to minimize memory usage. Of course, these large chunks still get freed automatically if the alloc set is reset. I have set ALLOC_BIGCHUNK_LIMIT at 64K for now, but perhaps another size would be better?
* coerce_type() failed to guard against trying to convert a NULLTom Lane1999-08-241-17/+17
| | | | | constant to a different type. Not sure that this could happen in ordinary parser usage, but it can in some new code I'm working on...
* Remove bogus code in oper_exact --- if it didn't find an exactTom Lane1999-08-234-105/+33
| | | | | | | | | match then it tried for a self-commutative operator with the reversed input data types. This is pretty silly; there could never be such an operator, except maybe in binary-compatible-type scenarios, and we have oper_inexact for that. Besides which, the oprsanity regress test would complain about such an operator. Remove nonfunctional code and simplify routine calling convention accordingly.
* Further sort-order twiddling in optimizer: be smart aboutTom Lane1999-08-224-57/+97
| | | | case where ORDER BY and GROUP BY request the same sort order.
* Un-break code generated by ECPGRelease production.Tom Lane1999-08-221-2/+3
|
* Further planner/optimizer cleanups. Move all set_tlist_referencesTom Lane1999-08-2223-950/+649
| | | | | | | | | | and fix_opids processing to a single recursive pass over the plan tree executed at the very tail end of planning, rather than haphazardly here and there at different places. Now that tlist Vars do not get modified until the very end, it's possible to get rid of the klugy var_equal and match_varid partial-matching routines, and just use plain equal() throughout the optimizer. This is a step towards allowing merge and hash joins to be done on expressions instead of only Vars ...
* Major revision of sort-node handling: push knowledge of queryTom Lane1999-08-2133-996/+961
| | | | | | | | | | | | | sort order down into planner, instead of handling it only at the very top level of the planner. This fixes many things. An explicit sort is now avoided if there is a cheaper alternative (typically an indexscan) not only for ORDER BY, but also for the internal sort of GROUP BY. It works even when there is no other reason (such as a WHERE condition) to consider the indexscan. It works for indexes on functions. It works for indexes on functions, backwards. It's just so cool... CAUTION: I have changed the representation of SortClause nodes, therefore THIS UPDATE BREAKS STORED RULES. You will need to initdb.
* Cleanups for int8: guard against null inputs in comparisonTom Lane1999-08-211-19/+87
| | | | | operators (and some other places), fix rangechecks in int8 to int4 conversion (same problem we recently figured out in pg_atoi).
* Ooops ... I had left some test coding in selfuncs.c thatTom Lane1999-08-211-6/+16
| | | | failed on 'field < textconstant' ...
* Old multi-byte bug. Forgot to rename #ifdef MB to #ifdef MULTIBYTETatsuo Ishii1999-08-181-2/+2
| | | | Now SET NAMES working again...
* Remove extraneous SeqScan node that make_noname was insertingTom Lane1999-08-182-40/+32
| | | | | | above a Sort or Materialize node. As far as I can tell, the only place that actually needed that was set_tlist_references, which was being lazy about checking to see if it had a noname node to fix or not...
* Add script that runs the regression tests with all validTom Lane1999-08-171-0/+98
| | | | | combinations of query-plan-type backend options. Good for testing planner/optimizer. Tedious, though.
* EXPLAIN didn't know about 'Materialize' plan nodes.Tom Lane1999-08-161-1/+4
|
* Assign sort keys properly when there are duplicate entries inTom Lane1999-08-161-35/+63
| | | | | pathkey list --- corrects misbehavior seen with multiple mergejoin clauses mentioning same variable.
* I've sent 3 mails to pgsql-patches. There are two files, one for docBruce Momjian1999-08-161-0/+12
| | | | | | | | and for src/data directories, and one minor patch for doc/README.locale. Please apply. Oleg.
* Fix for perl5 on BSD/OS.Bruce Momjian1999-08-161-3/+3
|
* Allow BSD yacc and bison to compile pl code.Bruce Momjian1999-08-161-3/+9
|
* Major planner/optimizer revision: get rid of PathOrder node type,Tom Lane1999-08-1643-3249/+1916
| | | | | | | | | 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.
* Small updates to #include lists for pending optimizer checkin.Tom Lane1999-08-162-3/+4
|
* Move funcid_get_rettype() to lsyscache.Tom Lane1999-08-161-23/+3
|
* Add get_func_rettype() to general-use lsyscache routines,Tom Lane1999-08-162-2/+29
| | | | since it's now needed in both optimizer and parser.
* Fix for Win32 making problem with MB enabled.Tatsuo Ishii1999-08-161-1/+30
| | | | Patches created by Hiroki Kataoka.
* Repair the check for redundant UNIQUE and PRIMARY KEY indices.Thomas G. Lockhart1999-08-151-13/+33
| | | | | Also, improve it so that it checks for multi-column constraints. Thanks to Mark Dalphin <mdalphin@amgen.com> for reporting the problem.
* LispUnion fix changes output ordering for inheritance tests.Tom Lane1999-08-141-21/+21
|
* LispUnion routine didn't generate a proper union: anytimeTom Lane1999-08-141-212/+133
| | | | | l2 contained more than one entry, there would be duplicates in the output list. Miscellaneous code beautification in other routines, too.
* Update comments about pathkeys.Tom Lane1999-08-131-28/+63
|
* Clean up optimizer's handling of indexscan quals that need to beTom Lane1999-08-124-239/+258
| | | | | | | | | | | | 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.
* Add commentary to show that even though ExecInitIndexScan()Tom Lane1999-08-121-40/+52
| | | | | | | 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...
* Minor cleanups and code beautification; eliminate someTom Lane1999-08-105-225/+118
| | | | routines that are now dead code.
* Revise create_nestloop_node's handling of inner indexscan toTom Lane1999-08-101-53/+57
| | | | | | | | 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.
* > > Prevent sorting if result is already sortedBruce Momjian1999-08-099-28/+78
| | | | | | | | | | | | | | > > > > 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
* Clean up tlist.c tree-walking routines withTom Lane1999-08-091-280/+88
| | | | expression_tree_mutator.
* Store -1 in attdisbursion to signal 'no duplicates in column'.Tom Lane1999-08-093-102/+43
| | | | Centralize att_disbursion readout logic.
* Move get_attdisbursion to lsyscache. Clean up get_typdefault.Tom Lane1999-08-095-131/+187
|
* Update comments about attdisbursion. NO code change.Tom Lane1999-08-091-3/+10
|
* Re-use free space on index pages with duplicates.Vadim B. Mikheev1999-08-091-20/+9
|
* Rewrite fix_indxqual_references, which was entirely bogus forTom Lane1999-08-091-147/+134
| | | | | | | 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...
* Clean up routines in setrefs.c by replacing individual treeTom Lane1999-08-092-551/+157
| | | | walking logic with expression_tree_walker/mutator calls.
* Create a standardized expression_tree_mutator support routineTom Lane1999-08-093-52/+281
| | | | | | 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.
* replace #Include .Bruce Momjian1999-08-091-3/+4
|