summaryrefslogtreecommitdiff
path: root/src/backend/executor/execProcnode.c
AgeCommit message (Collapse)Author
2006-06-09Revert sampling patch for EXPLAIN ANALYZE; it turns out to be too unreliableTom Lane
because node timing is much less predictable than the patch expects. I kept the API change for InstrStopNode, however.
2006-05-30Make EXPLAIN sampling smarter, to avoid excessive sampling delay.Bruce Momjian
Martijn van Oosterhout
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2006-02-28Extend the ExecInitNode API so that plan nodes receive a set of flagTom Lane
bits indicating which optional capabilities can actually be exercised at runtime. This will allow Sort and Material nodes, and perhaps later other nodes, to avoid unnecessary overhead in common cases. This commit just adds the infrastructure and arranges to pass the correct flag values down to plan nodes; none of the actual optimizations are here yet. I'm committing this separately in case anyone wants to measure the added overhead. (It should be negligible.) Simon Riggs and Tom Lane
2005-12-07Fix a couple of lingering references to POSTQUEL query syntax, per Simon.Tom Lane
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-04-19Create executor and planner-backend support for decoupled heap and indexTom Lane
scans, using in-memory tuple ID bitmaps as the intermediary. The planner frontend (path creation and cost estimation) is not there yet, so none of this code can be executed. I have tested it using some hacked planner code that is far too ugly to see the light of day, however. Committing now so that the bulk of the infrastructure changes go in before the tree drifts under me.
2005-04-16Create a new 'MultiExecProcNode' call API for plan nodes that don'tTom Lane
return just a single tuple at a time. Currently the only such node type is Hash, but I expect we will soon have indexscans that can return tuple bitmaps. A side benefit is that EXPLAIN ANALYZE now shows the correct tuple count for a Hash node.
2005-04-06Remove test for NULL node in ExecProcNode(). No place ever callsTom Lane
ExecProcNode() with a NULL value, so the test couldn't do anything for us except maybe mask bugs. Removing it probably doesn't save anything much either, but then again this is a hot-spot routine.
2005-03-25Improve EXPLAIN ANALYZE to show the time spent in each trigger whenTom Lane
executing a statement that fires triggers. Formerly this time was included in "Total runtime" but not otherwise accounted for. As a side benefit, we avoid re-opening relations when firing non-deferred AFTER triggers, because the trigger code can re-use the main executor's ResultRelInfo data structure.
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
2004-09-24ExecProcAppend() wasn't called ExecAppend() because the latter name wasNeil Conway
formerly used in execMain. Since that is no longer the case, this patch renames ExecProcAppend() to ExecAppend() for the sake of consistency.
2004-08-29Update copyright to 2004.Bruce Momjian
2004-05-26Reimplement the linked list data structure used throughout the backend.Neil Conway
In the past, we used a 'Lispy' linked list implementation: a "list" was merely a pointer to the head node of the list. The problem with that design is that it makes lappend() and length() linear time. This patch fixes that problem (and others) by maintaining a count of the list length and a pointer to the tail node along with each head node pointer. A "list" is now a pointer to a structure containing some meta-data about the list; the head and tail pointers in that structure refer to ListCell structures that maintain the actual linked list of nodes. The function names of the list API have also been changed to, I hope, be more logically consistent. By default, the old function names are still available; they will be disabled-by-default once the rest of the tree has been updated to use the new API names.
2004-03-02Remove useless rebuilding of subPlan list during ExecInitNode. Wouldn'tTom Lane
have been there to start with, except for overly enthusiastic copy-and- paste ...
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-08Another pgindent run with updated typedefs.Bruce Momjian
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-07-21Error message editing in backend/executor.Tom Lane
2003-05-05Ditch ExecGetTupType() in favor of the much simpler ExecGetResultType(),Tom Lane
which does the same thing. Perhaps at one time there was a reason to allow plan nodes to store their result types in different places, but AFAICT that's been unnecessary for a good while.
2003-02-09Make further use of new bitmapset code: executor's chgParam, extParam,Tom Lane
locParam lists can be converted to bitmapsets to speed updating. Also, replace 'locParam' with 'allParam', which contains all the paramIDs relevant to the node (i.e., the union of extParam and locParam); this saves a step during SetChangedParamList() without costing anything elsewhere.
2002-12-14Clean up plantree representation of SubPlan-s --- SubLink does not appearTom Lane
in the planned representation of a subplan at all any more, only SubPlan. This means subselect.c doesn't scribble on its input anymore, which seems like a good thing; and there are no longer three different possible interpretations of a SubLink. Simplify node naming and improve comments in primnodes.h. No change to stored rules, though.
2002-12-13Phase 3 of read-only-plans project: ExecInitExpr now builds expressionTom Lane
execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
2002-12-12Phase 2 of read-only-plans project: restructure expression-tree nodesTom Lane
so that all executable expression nodes inherit from a common supertype Expr. This is somewhat of an exercise in code purity rather than any real functional advance, but getting rid of the extra Oper or Func node formerly used in each operator or function call should provide at least a little space and speed improvement. initdb forced by changes in stored-rules representation.
2002-12-05Phase 1 of read-only-plans project: cause executor state nodes to pointTom Lane
to plan nodes, not vice-versa. All executor state nodes now inherit from struct PlanState. Copying of plan trees has been simplified by not storing a list of SubPlans in Plan nodes (eliminating duplicate links). The executor still needs such a list, but it can build it during ExecutorStart since it has to scan the plan tree anyway. No initdb forced since no stored-on-disk structures changed, but you will need a full recompile because of node-numbering changes.
2002-06-20Update copyright to 2002.Bruce Momjian
2002-05-12First pass at set-returning-functions in FROM, by Joe Conway withTom Lane
some kibitzing from Tom Lane. Not everything works yet, and there's no documentation or regression test, but let's commit this so Joe doesn't need to cope with tracking changes in so many files ...
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-09-18EXPLAIN ANALYZE feature to measure and show actual runtimes and tupleTom Lane
counts alongside the planner's estimates. By Martijn van Oosterhout, with some further work by Tom Lane.
2001-03-22Remove dashes in comments that don't need them, rewrap with pgindent.Bruce Momjian
2001-01-29Clean up handling of tuple descriptors so that result-tuple descriptorsTom Lane
allocated by plan nodes are not leaked at end of query. This doesn't really matter for normal queries, but it sure does for queries invoked repetitively inside SQL functions. Clean up some other grotty code associated with tupdescs, and fix a few other memory leaks exposed by tests with simple SQL functions.
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2001-01-14Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane
are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
2000-10-26Re-implement LIMIT/OFFSET as a plan node type, instead of a hack inTom Lane
ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a cursor declaration will behave in a reasonable fashion, whereas before it was overridden by the FETCH count.
2000-10-05Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet theTom Lane
SQL92 semantics, including support for ALL option. All three can be used in subqueries and views. DISTINCT and ORDER BY work now in views, too. This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT where the SELECT yields different datatypes than the INSERT needs. I did that by making UNION subqueries and SELECT in INSERT be treated like subselects-in-FROM, thereby allowing an extra level of targetlist where the datatype conversions can be inserted safely. INITDB NEEDED!
2000-09-29Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.Tom Lane
(Don't forget that an alias is required.) Views reimplemented as expanding to subselect-in-FROM. Grouping, aggregates, DISTINCT in views actually work now (he says optimistically). No UNION support in subselects/views yet, but I have some ideas about that. Rule-related permissions checking moved out of rewriter and into executor. INITDB REQUIRED!
2000-08-13Clean up handling of variable-free qual clauses. System now does theTom Lane
right thing with variable-free clauses that contain noncachable functions, such as 'WHERE random() < 0.5' --- these are evaluated once per potential output tuple. Expressions that contain only Params are now candidates to be indexscan quals --- for example, 'var = ($1 + 1)' can now be indexed. Cope with RelabelType nodes atop potential indexscan variables --- this oversight prevents 7.0.* from recognizing some potentially indexscanable situations.
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-05Fix it's and its to be correct.Bruce Momjian
1999-11-23Tid access method feature from Hiroshi Inoue, Inoue@tpf.co.jpBruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-03-23Remove Tee code, move to _deadcode.Bruce Momjian
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-06-15Remove un-needed braces around single statements.Bruce Momjian
1998-05-19Allow cancel from client of backend query. Change some int variablesBruce Momjian
to bool's.
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-02-13Support for subselects.Vadim B. Mikheev
ExecReScan for nodeAgg, nodeHash, nodeHashjoin, nodeNestloop and nodeResult. Fixed ExecReScan for nodeMaterial. Get rid of #ifdef INDEXSCAN_PATCH. Get rid of ExecMarkPos and ExecRestrPos in nodeNestloop.
1998-01-07Goodbye ABORT. Hello ERROR for all errors.Bruce Momjian