summaryrefslogtreecommitdiff
path: root/src/backend/executor
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused #includes in *.c files.Bruce Momjian1999-07-1521-90/+19
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-1512-27/+13
|
* Remove S*I comments from Stephan.Bruce Momjian1999-07-131-2/+1
|
* ExecReScanGroup() forgot to clear grpstate->grp_firstTuple,Tom Lane1999-07-111-1/+7
| | | | thereby guaranteeing wrong results from a rescanned Group node.
* Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGNBruce Momjian1999-06-171-21/+1
| | | | for Irix.
* When targetlist is NULL, ExecTargetList was passing back aTom Lane1999-06-121-32/+10
| | | | | | | | pointer to palloc'd but uninitialized memory. This is not cool; anyone looking at the returned 'tuple' would at best coredump and at worst behave in a bizarre and irreproducible way. Fix it to return a predictable value, namely a correctly-set-up palloc'd tuple containing zero attributes. I believe this fix is both safe and critical.
* Reversed out Massimo patch.Bruce Momjian1999-06-121-47/+1
|
* I don't like last minute patches before the final freeze, but I believe thatBruce Momjian1999-06-121-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this one could be useful for people experiencing out-of-memory crashes while executing queries which retrieve or use a very large number of tuples. The problem happens when storage is allocated for functions results used in a large query, for example: select upper(name) from big_table; select big_table.array[1] from big_table; select count(upper(name)) from big_table; This patch is a dirty hack that fixes the out-of-memory problem for the most common cases, like the above ones. It is not the final solution for the problem but it can work for some people, so I'm posting it. The patch should be safe because all changes are under #ifdef. Furthermore the feature can be enabled or disabled at runtime by the `free_tuple_memory' options in the pg_options file. The option is disabled by default and must be explicitly enabled at runtime to have any effect. To enable the patch add the follwing line to Makefile.custom: CUSTOM_COPT += -DFREE_TUPLE_MEMORY To enable the option at runtime add the following line to pg_option: free_tuple_memory=1 Massimo
* Reset evaluation plan tuple table next free slot counter to 0Vadim B. Mikheev1999-06-091-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | after ExecEndNode. It must be done! Or we'll be out of free tuple slots very soon, though slots are freed by ExecEndNode and ready for reusing. We didn't see this problem before because of int nSlots = ExecCountSlotsNode(plan); TupleTable tupleTable = ExecCreateTupleTable(nSlots + 10); /* why add ten? - jolly */ code in InitPlan - i.e. extra 10 slots. Simple select uses 3 slots and so it was possible to re-use evaluation plan 3 additional times and didn't get elog(NOTICE, "Plan requires more slots than are available"); elog(ERROR, "send mail to your local executor guru to fix this"); Changes are obvious and shouldn't be problems with them. Though, I added Assert(epqstate->es_tupleTable->next == 0) before EvalPlanQual():ExecInitNode and we'll notice if something is still wrong. Is it better to change Assert to elog(ERROR) ?
* I used bad style of comments and ... commented out some code inVadim B. Mikheev1999-06-061-11/+9
| | | | | EvalPlanQualNext() when implemented it... -:) Uncommented...
* Ensure consistent results when FormSortKeys fails to findTom Lane1999-06-031-2/+4
| | | | all the expected keys (it was returning uninitialized memory).
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-256-25/+25
|
* pgindent run over code.Bruce Momjian1999-05-2519-801/+823
|
* Rewrite hash join to use simple linked lists instead of aTom Lane1999-05-182-782/+409
| | | | | | | fixed-size hashtable. This should prevent 'hashtable out of memory' errors, unless you really do run out of memory. Note: target size for hashtable is now taken from -S postmaster switch, not -B, since it is local memory in the backend rather than shared memory.
* Change resjunk to a boolean.Bruce Momjian1999-05-171-8/+8
|
* Rip out QueryTreeList structure, root and branch. QuerytreeTom Lane1999-05-132-60/+41
| | | | | | | | | | lists are now plain old garden-variety Lists, allocated with palloc, rather than specialized expansible-array data allocated with malloc. This substantially simplifies their handling and eliminates several sources of memory leakage. Several basic types of erroneous queries (syntax error, attempt to insert a duplicate key into a unique index) now demonstrably leak zero bytes per query.
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-104-13/+10
| | | | real affect now.
* Update hash and join routines to use fd.c's new temp-fileTom Lane1999-05-092-57/+6
| | | | code, instead of not-very-bulletproof stuff they had before.
* Fix some nasty coredump bugs in hashjoin. This code was justTom Lane1999-05-062-122/+131
| | | | | | | | | | about certain to fail anytime it decided the relation to be hashed was too big to fit in memory --- the code for 'batching' a series of hashjoins had multiple errors. I've fixed the easier problems. A remaining big problem is that you can get 'hashtable out of memory' if the code's guesstimate about how much overflow space it will need turns out wrong. That will require much more extensive revisions to fix, so I'm committing these fixes now before I start on that problem.
* Aggregate functions didn't work on subscripted array references.Tom Lane1999-04-291-64/+23
| | | | Things are better now.
* Fix problems seen when result of a subselect was used in anTom Lane1999-04-191-13/+42
| | | | | | | expression context (ie, not at the top level of a WHERE clause). Examples like this one work now: SELECT name, value FROM t1 as touter WHERE (value/(SELECT AVG(value) FROM t1 WHERE name = touter.name)) > 0.75;
* There are some bugs about backward scanning usingBruce Momjian1999-04-131-8/+34
| | | | | | | | | | | | | | | 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. Hiroshi Inoue
* Fix some more hashjoin-related bugs in pg_operator. FixTom Lane1999-04-071-37/+39
| | | | | | | 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.
* Small cleanups.Bruce Momjian1999-03-301-2/+2
|
* Remove Tee code, move to _deadcode.Bruce Momjian1999-03-236-41/+9
|
* Correct some comments, fix a small memory wastage when datatypeTom Lane1999-03-211-12/+15
| | | | is pass-by-value.
* Reverse out pfree agg part of patch from Erik Riedel.Bruce Momjian1999-03-201-3/+0
|
* cleanupBruce Momjian1999-03-201-3/+3
|
* Fix for aggregate memory leaks from Erik Riedel.Bruce Momjian1999-03-204-4/+76
|
* Fix for memory leak in executor with fjIsNull.Bruce Momjian1999-03-191-2/+5
|
* I suggest the following portability patch, which does notBruce Momjian1999-03-191-2/+3
| | | | | | | | | | change functionality, but makes the code more ANSI C'ish. My AIX xlc compiler barfs on all of these. Can someone please review and apply to current. <<port.patch>> Thanks Andreas
* CleanupBruce Momjian1999-03-141-3/+2
|
* We have to return dummy tuple for empty targetlist!Vadim B. Mikheev1999-03-101-9/+8
| | | | | | Try select t1.x from t1, t2 where t1.y = 1 and t2.y = 1 - t2 scan target list will be empty and so no one tuple will be returned...
* Changes to fix/improve the dynamic loading on NTMarc G. Fournier1999-03-091-4/+4
| | | | From: Horak Daniel <horak@mmp.plzen-city.cz>
* Fix executor to work correctly with mergejoins where left andTom Lane1999-02-281-118/+75
| | | | right sides have different data types.
* update commentsBruce Momjian1999-02-241-78/+89
|
* Fix typos in comments.Thomas G. Lockhart1999-02-231-3/+3
|
* Add first code to help with outer joins.Thomas G. Lockhart1999-02-231-120/+247
| | | | | | Enable by defining CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG in your Makefile.custom
* Fix typo in comment.Thomas G. Lockhart1999-02-231-2/+2
|
* comment cleanup.Bruce Momjian1999-02-223-299/+190
|
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-214-9/+9
| | | | | | Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-1326-56/+56
|
* Rename Temp to Noname for noname tables.Bruce Momjian1999-02-093-10/+10
|
* Added LIMIT/OFFSET functionality including new regression test for it.Jan Wieck1999-02-083-17/+173
| | | | | | | Removed CURRENT keyword for rule queries and changed rules regression accordingly. CURRENT has beed announced to disappear in v6.5. Jan
* Changed ExecConstraints() and ExecRelCheck() to cache the constraintsJan Wieck1999-02-071-9/+19
| | | | | | | | | qualification expression trees in the execution state. Prevents from memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK constraints. Speedup against the variant using freeObject() is more than factor 2. Jan
* Missing semicolon in last fix :-}Jan Wieck1999-02-071-2/+2
| | | | Jan
* One more fix to QuerySnapshot usage in ExecutorStart(). MaybeJan Wieck1999-02-071-6/+11
| | | | | | current QuerySnapshot could be NULL. Jan
* Fixed problem with multiple portals shown up in portals_p2 regressionJan Wieck1999-02-071-2/+16
| | | | | | | | test after new AllocSet code. Activated optimal AllocSet blocksize and chunk limit. Jan
* New alloc set code using a memory block pool for small allocations.Jan Wieck1999-02-061-2/+2
| | | | Jan
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-0311-48/+30
|