aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
Commit message (Collapse)AuthorAge
...
* Clean up inefficiency in ExecRelCheck, and cause it to do the rightTom Lane2000-08-06
| | | | | | thing when there are multiple result relations. Formerly, during something like 'UPDATE foo*', foo's constraints and *only* foo's constraints would be applied to all foo's children. Wrong-o ...
* First stage of reclaiming memory in executor by resetting short-termTom Lane2000-07-12
| | | | | | memory contexts. Currently, only leaks in expressions executed as quals or projections are handled. Clean up some old dead cruft in executor while at it --- unused fields in state nodes, that sort of thing.
* Changed TOAST relations to have relkind RELKIND_TOASTVALUE.Jan Wieck2000-07-05
| | | | | | | | | | | | | Special handling of TOAST relations during VACUUM. TOAST relations are vacuumed while the lock on the master table is still active. The ANALYZE flag doesn't propagate to their vacuuming because the toaster access routines allways use index access ignoring stats, so why compute them at all. Protection of TOAST relations against normal INSERT/UPDATE/DELETE while offering SELECT for debugging purposes. Jan
* Automatically create toast tables on ALTER TABLE ... ADD COLUMNJan Wieck2000-07-05
| | | | | | and SELECT ... INTO ... too. Jan
* Make toast-table creation and deletion work somewhat reliably.Tom Lane2000-07-04
| | | | | | | Don't go through pg_exec_query_dest(), but directly to the execution routines. Also, extend parameter lists so that there's no need to change the global setting of allowSystemTableMods, a hack that was certain to cause trouble in the event of any error.
* Fix performance problems with pg_index lookups (see, for example,Tom Lane2000-06-17
| | | | | | | | | | discussion of 5/19/00). pg_index is now searched for indexes of a relation using an indexscan. Moreover, this is done once and cached in the relcache entry for the relation, in the form of a list of OIDs for the indexes. This list is used by the parser and executor to drive lookups in the pg_index syscache when they want to know the properties of the indexes. Net result: index information will be fully cached for repetitive operations such as inserts.
* Final #include cleanup.Bruce Momjian2000-06-15
|
* nodeAppend tried to deal with multiple result relations, but apparently it neverTom Lane2000-06-10
| | | | really worked. Until now.
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* Second round of fmgr changes: triggers are now invoked in new style,Tom Lane2000-05-29
| | | | CurrentTriggerData is history.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Commebts & one check in EndEvalPlanQual().Vadim B. Mikheev2000-04-07
|
* Fix (I hope) resource leakage in EvalPlanQual: open subplans must beTom Lane2000-04-07
| | | | | properly shut down in EndPlan, else we fail to free buffers and so forth that they hold.
* Redo permissions-checking code so that it does the right thing at APPENDTom Lane2000-03-09
| | | | | | nodes. The former version failed to check permissions of relations that were referenced in second and later clauses of UNIONs, and it did not check permissions of tables referenced via inheritance.
* Carry column aliases from the parser frontend. Enables queries likeThomas G. Lockhart2000-02-15
| | | | | | | SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
* Repair relation refcount leakage caused by SELECT FOR UPDATE.Tom Lane2000-02-03
|
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Fix handling of NULL constraint conditions: per SQL92 spec, a NULL resultTom Lane2000-01-19
| | | | | | | | | from a constraint condition does not violate the constraint (cf. discussion on pghackers 12/9/99). Implemented by adding a parameter to ExecQual, specifying whether to return TRUE or FALSE when the qual result is really NULL in three-valued boolean logic. Currently, ExecRelCheck is the only caller that asks for TRUE, but if we find any other places that have the wrong response to NULL, it'll be easy to fix them.
* setheapoverride() is history. Uses replaced with CommandCounterIncrement()Tom Lane2000-01-17
| | | | | where necessary --- several of them didn't really need it, though. tqual-checking macros simplified accordingly.
* Fix it's and its to be correct.Bruce Momjian2000-01-05
|
* Some changes to prepare for LONG attributes.Jan Wieck1999-12-16
| | | | Jan
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-10
|
* Rename heap_replace to heap_update.Bruce Momjian1999-11-24
|
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* Don't call ExecOpenIndices if pg_class relhasindex shows there are noTom Lane1999-11-01
| | | | indexes to open. Avoid unnecessary work in ExecCheckPerm, too.
* Avoid duplicate ExecTypeFromTL() call in ExecInitJunkFilter() by passingTom Lane1999-10-30
| | | | | | | in the TupleDesc that the caller already has (for call from ExecMain) or can make just as easily as ExecInitJunkFilter() can (for call from ExecAppend). Also, don't bother to build a junk filter for an INSERT operation that doesn't actually need one, which is the normal case.
* Fix planner and rewriter to follow SQL semantics for tables that areTom Lane1999-10-07
| | | | | | | | | | | mentioned in FROM but not elsewhere in the query: such tables should be joined over anyway. Aside from being more standards-compliant, this allows removal of some very ugly hacks for COUNT(*) processing. Also, allow HAVING clause without aggregate functions, since SQL does. Clean up CREATE RULE statement-list syntax the same way Bruce just fixed the main stmtmulti production. CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules; you will have to initdb if you have any rules.
* This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck1999-09-29
| | | | | | | | | | | | Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
* Several changes here, not very related but touching some of the same files.Tom Lane1999-09-24
| | | | | | | | | | | | | | | | | | | | | * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22). * Add links to backend PROC structs to sinval's array of per-backend info, and use these links for routines that need to check the state of all backends (rather than the slow, complicated search of the ShmemIndex hashtable that was used before). Add databaseOID to PROC structs. * Use this to implement an interlock that prevents DESTROY DATABASE of a database containing running backends. (It's a little tricky to prevent a concurrently-starting backend from getting in there, since the new backend is not able to lock anything at the time it tries to look up its database in pg_database. My solution is to recheck that the DB is OK at the end of InitPostgres. It may not be a 100% solution, but it's a lot better than no interlock at all...) * In ALTER TABLE RENAME, flush buffers for the relation before doing the rename of the physical files, to ensure we don't get failures later from mdblindwrt(). * Update TRUNCATE patch so that it actually compiles against current sources :-(. You should do "make clean all" after pulling these changes.
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-18
| | | | | | | | | | | | | | | | | additional argument specifying the kind of lock to acquire/release (or 'NoLock' to do no lock processing). Ensure that all relations are locked with some appropriate lock level before being examined --- this ensures that relevant shared-inval messages have been processed and should prevent problems caused by concurrent VACUUM. Fix several bugs having to do with mismatched increment/decrement of relation ref count and mismatched heap_open/close (which amounts to the same thing). A bogus ref count on a relation doesn't matter much *unless* a SI Inval message happens to arrive at the wrong time, which is probably why we got away with this sloppiness for so long. Repair missing grab of AccessExclusiveLock in DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi. Recommend 'make clean all' after pulling this update; I modified the Relation struct layout slightly. Will post further discussion to pghackers list shortly.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Update #include cleanupsBruce Momjian1999-07-16
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGNBruce Momjian1999-06-17
| | | | for Irix.
* Reset evaluation plan tuple table next free slot counter to 0Vadim B. Mikheev1999-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | 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-06
| | | | | EvalPlanQualNext() when implemented it... -:) Uncommented...
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-25
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-10
| | | | real affect now.
* Remove Tee code, move to _deadcode.Bruce Momjian1999-03-23
|
* Fix for aggregate memory leaks from Erik Riedel.Bruce Momjian1999-03-20
|
* I suggest the following portability patch, which does notBruce Momjian1999-03-19
| | | | | | | | | | 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
* comment cleanup.Bruce Momjian1999-02-22
|
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-21
| | | | | | 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-13
|
* Added LIMIT/OFFSET functionality including new regression test for it.Jan Wieck1999-02-08
| | | | | | | 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-07
| | | | | | | | | 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-07
| | | | Jan