aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
Commit message (Collapse)AuthorAge
* Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.Tom Lane2004-02-03
| | | | | | | Make btree index creation and initial validation of foreign-key constraints use maintenance_work_mem rather than work_mem as their memory limit. Add some code to guc.c to allow these variables to be referenced by their old names in SHOW and SET commands, for backwards compatibility.
* Fix debug elog message to agree with name of its routine.Tom Lane2004-01-30
|
* Fix oversight in optimization that avoids an unnecessary projection stepTom Lane2004-01-22
| | | | | | when scanning a table that we need all the columns from. In case of SELECT INTO, we have to check that the hasoids flag matches the desired output type, too. Per report from Mike Mascari.
* Fix permission-checking bug reported by Tim Burgess 10-Feb-03 (this timeTom Lane2004-01-14
| | | | | | | | | for sure...). Rather than relying on the query context of a rangetable entry to identify what permissions it wants checked, store a full AclMode mask in each RTE, and check exactly those bits. This allows an RTE specifying, say, INSERT privilege on a view to be copied into a derived UPDATE query without changing meaning. Per recent discussion thread. initdb forced due to change of stored rule representation.
* Implement "WITH / WITHOID OIDS" clause for CREATE TABLE AS. This isNeil Conway2004-01-10
| | | | | | | | | | intended to allow application authors to insulate themselves from changes to the default value of 'default_with_oids' in future releases of PostgreSQL. This patch also fixes a bug in the earlier implementation of the 'default_with_oids' GUC variable: code in gram.y should not examine the value of GUC variables directly due to synchronization issues.
* More janitorial work: remove the explicit casting of NULL literals to aNeil Conway2004-01-07
| | | | | | | | pointer type when it is not necessary to do so. For future reference, casting NULL to a pointer type is only necessary when (a) invoking a function AND either (b) the function has no prototype OR (c) the function is a varargs function.
* Instead of rechecking lossy index operators by putting them into theTom Lane2004-01-06
| | | | | | | | | regular qpqual ('filter condition'), add special-purpose code to nodeIndexscan.c to recheck them. This ends being almost no net addition of code, because the removal of planner code balances out the extra executor code, but it is significantly more efficient when a lossy operator is involved in an OR indexscan. The old implementation had to recheck the entire indexqual in such cases.
* Avoid running out of memory during hash_create, by not passing aTom Lane2003-12-30
| | | | | number-of-buckets that exceeds the size we actually plan to allow the hash table to grow to. Per trouble report from Sean Shanny.
* Clean up the usage of canonicalize_qual(): in particular, be consistentTom Lane2003-12-28
| | | | | | | | | about whether it is applied before or after eval_const_expressions(). I believe there were some corner cases where the system would fail to recognize that a partial index is applicable because of the previous inconsistency. Store normal rather than 'implicit AND' representations of constraints and index predicates in the catalogs. initdb forced due to representation change of constraints/predicates.
* Use a shutdown callback to clear setArgsValid in a FuncExprState that isTom Lane2003-12-18
| | | | | evaluating a set-valued function. This fixes some additional problems with rescanning partially-evaluated SRFs.
* Ensure set-returning functions in the targetlist of a plan node will beTom Lane2003-12-18
| | | | | | shut down cleanly if the plan node is ReScanned before the SRFs are run to completion. This fixes the problem for SQL-language functions, but still need work on functions using the SRF_XXX() macros.
* Add a warning to AtEOXact_SPI() to catch cases where the currentJoe Conway2003-12-02
| | | | | | transaction has been committed without SPI_finish() being called first. Per recent discussion here: http://archives.postgresql.org/pgsql-patches/2003-11/msg00286.php
* This patch refactors execTuples.c in two ways.Bruce Momjian2003-12-01
| | | | Neil Conway
* This patch adds a new GUC var, "default_with_oids", which follows theBruce Momjian2003-12-01
| | | | | | | | proposal for eventually deprecating OIDs on user tables that I posted earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or WITHOUT OIDS when dumping a table. The documentation has been updated. Neil Conway
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Get rid of hashkeys field of Hash plan node, since it's redundant withTom Lane2003-11-25
| | | | | | the hashclauses field of the parent HashJoin. This avoids problems with duplicated links to SubPlans in hash clauses, as per report from Andrew Holm-Hansen.
* Cross-data-type comparisons are now indexable by btrees, pursuant to myTom Lane2003-11-12
| | | | | | | | | | pghackers proposal of 8-Nov. All the existing cross-type comparison operators (int2/int4/int8 and float4/float8) have appropriate support. The original proposal of storing the right-hand-side datatype as part of the primary key for pg_amop and pg_amproc got modified a bit in the event; it is easier to store zero as the 'default' case and only store a nonzero when the operator is actually cross-type. Along the way, remove the long-since-defunct bigbox_ops operator class.
* Add operator strategy and comparison-value datatype fields to ScanKey.Tom Lane2003-11-09
| | | | | | | | | | | Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
* Implement isolation levels read uncommitted and repeatable read as actingPeter Eisentraut2003-11-06
| | | | like the next higher one.
* Back out makeNode() patch to fix gcc 3.3.1 warning.Bruce Momjian2003-10-13
|
* Use makeNode() to allocate structures that have to be cast to Node *,Bruce Momjian2003-10-12
| | | | | | rather than allocating them on the stack. Fixes complaint from gcc 3.3.1.
* Back out -fstrict-aliasing void* casting.Bruce Momjian2003-10-11
|
* This patch will stop gcc from issuing warnings about type-punned objectsBruce Momjian2003-10-11
| | | | | | | when -fstrict-aliasing is turned on, as it is in the latest gcc when you use -O2 Andrew Dunstan
* Repair RI trigger visibility problems (this time for sure ;-)) per recentTom Lane2003-10-01
| | | | | | | discussion on pgsql-hackers: in READ COMMITTED mode we just have to force a QuerySnapshot update in the trigger, but in SERIALIZABLE mode we have to run the scan under a current snapshot and then complain if any rows would be updated/deleted that are not visible in the transaction snapshot.
* I discovered that TupleDescGetAttInMetadata and BuildTupleFromCStringsBruce Momjian2003-09-29
| | | | | | | don't deal well with tuples having dropped columns. The attached fixes the issue. Please apply. Joe Conway
* Fix tid scan evaluation of non-constant TID values; can't try to do itTom Lane2003-09-26
| | | | during ExecInitTidScan, because the rest of the executor isn't ready.
* Make the world safe (more or less) for dropped columns in plpgsql rowtypes.Tom Lane2003-09-25
|
* tlist_matches_tupdesc() needs to defend itself against dropped columns.Tom Lane2003-09-25
|
* Get rid of ReferentialIntegritySnapshotOverride by extending Executor APITom Lane2003-09-25
| | | | | | to allow es_snapshot to be set to SnapshotNow rather than a query snapshot. This solves a bug reported by Wade Klaver, wherein triggers fired as a result of RI cascade updates could misbehave.
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Repair some REINDEX problems per recent discussions. The relcache isTom Lane2003-09-24
| | | | | | | | | | | | | now able to cope with assigning new relfilenode values to nailed-in-cache indexes, so they can be reindexed using the fully crash-safe method. This leaves only shared system indexes as special cases. Remove the 'index deactivation' code, since it provides no useful protection in the shared- index case. Require reindexing of shared indexes to be done in standalone mode, but remove other restrictions on REINDEX. -P (IgnoreSystemIndexes) now prevents using indexes for lookups, but does not disable index updates. It is therefore safe to allow from PGOPTIONS. Upshot: reindexing system catalogs can be done without a standalone backend for all cases except shared catalogs.
* _SPI_cursor_operation forgot to check for failure return fromTom Lane2003-09-23
| | | | _SPI_begin_call. Per gripe from Tomasz Myrta.
* Since SPI_modifytuple's natts argument is the number of attributes to beTom Lane2003-09-16
| | | | changed, it should allow a zero value (implying no changes to make).
* Fix LISTEN/NOTIFY race condition reported by Gavin Sherry. While aTom Lane2003-09-15
| | | | | | | | | | | | | | | really general fix might be difficult, I believe the only case where AtCommit_Notify could see an uncommitted tuple is where the other guy has just unlistened and not yet committed. The best solution seems to be to just skip updating that tuple, on the assumption that the other guy does not want to hear about the notification anyway. This is not perfect --- if the other guy rolls back his unlisten instead of committing, then he really should have gotten this notify. But to do that, we'd have to wait to see if he commits or not, or make UNLISTEN hold exclusive lock on pg_listener until commit. Either of these answers is deadlock-prone, not to mention horrible for interactive performance. Do it this way for now. (What happened to that project to do LISTEN/NOTIFY in memory with no table, anyway?)
* OK, some of these syntax errors should be given other codes.Peter Eisentraut2003-09-15
|
* Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut2003-09-09
| | | | | feature they complain about isn't a feature or cannot be implemented without definitional changes.
* Tweak processing of multiple-index-scan plans to reduce overhead whenTom Lane2003-08-22
| | | | | | | handling many-way scans: instead of re-evaluating all prior indexscan quals to see if a tuple has been fetched more than once, use a hash table indexed by tuple CTID. But fall back to the old way if the hash table grows to exceed SortMem.
* Improve dynahash.c's API so that caller can specify the comparison functionTom Lane2003-08-19
| | | | | | | | | | | | | as well as the hash function (formerly the comparison function was hardwired as memcmp()). This makes it possible to eliminate the special-purpose hashtable management code in execGrouping.c in favor of using dynahash to manage tuple hashtables; which is a win because dynahash knows how to expand a hashtable when the original size estimate was too small, whereas the special-purpose code was too stupid to do that. (See recent gripe from Stephan Szabo about poor performance when hash table size estimate is way off.) Free side benefit: when using string_hash, the default comparison function is now strncmp() instead of memcmp(). This should eliminate some part of the overhead associated with larger NAMEDATALEN values.
* Fix ARRAY[] construct so that in multidimensional case, elements canTom Lane2003-08-17
| | | | | | | | be anything yielding an array of the proper kind, not only sub-ARRAY[] constructs; do subscript checking at runtime not parse time. Also, adjust array_cat to make array || array comply with the SQL99 spec. Joe Conway
* Code cleanup inspired by recent resname bug report (doesn't fix the bugTom Lane2003-08-11
| | | | | | | | yet, though). Avoid using nth() to fetch tlist entries; provide a common routine get_tle_by_resno() to search a tlist for a particular resno. This replaces a couple uses of nth() and a dozen hand-coded search loops. Also, replace a few uses of nth(length-1, list) with llast().
* Another pgindent run with updated typedefs.Bruce Momjian2003-08-08
|
* Fix nasty little order-of-operations bug in _SPI_cursor_operation.Tom Lane2003-08-08
| | | | Per report from Mendola Gaetano.
* Suppress unused-variable warnings when building without Asserts.Tom Lane2003-08-08
|
* Rename fields of DestReceiver to avoid collisions with (ill-considered)Tom Lane2003-08-06
| | | | macros in some platforms' sys/socket.h.
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-04
| | | | so it won't miss 'em again.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Adjust 'permission denied' messages to be more useful and consistent.Tom Lane2003-08-01
|
* Cause ARRAY[] construct to return a NULL array, rather than raising anTom Lane2003-07-30
| | | | | | error, if any input element is NULL. This is not what we ultimately want, but until arrays can have NULL elements, it will have to do. Patch from Joe Conway.
* Add error stack traceback support for SQL-language functions.Tom Lane2003-07-28
|