summaryrefslogtreecommitdiff
path: root/src/backend/executor
AgeCommit message (Collapse)Author
2004-02-03Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.Tom Lane
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.
2004-01-30Fix debug elog message to agree with name of its routine.Tom Lane
2004-01-22Fix oversight in optimization that avoids an unnecessary projection stepTom Lane
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.
2004-01-14Fix permission-checking bug reported by Tim Burgess 10-Feb-03 (this timeTom Lane
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.
2004-01-10Implement "WITH / WITHOID OIDS" clause for CREATE TABLE AS. This isNeil Conway
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.
2004-01-07More janitorial work: remove the explicit casting of NULL literals to aNeil Conway
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.
2004-01-06Instead of rechecking lossy index operators by putting them into theTom Lane
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.
2003-12-30Avoid running out of memory during hash_create, by not passing aTom Lane
number-of-buckets that exceeds the size we actually plan to allow the hash table to grow to. Per trouble report from Sean Shanny.
2003-12-28Clean up the usage of canonicalize_qual(): in particular, be consistentTom Lane
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.
2003-12-18Use a shutdown callback to clear setArgsValid in a FuncExprState that isTom Lane
evaluating a set-valued function. This fixes some additional problems with rescanning partially-evaluated SRFs.
2003-12-18Ensure set-returning functions in the targetlist of a plan node will beTom Lane
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.
2003-12-02Add a warning to AtEOXact_SPI() to catch cases where the currentJoe Conway
transaction has been committed without SPI_finish() being called first. Per recent discussion here: http://archives.postgresql.org/pgsql-patches/2003-11/msg00286.php
2003-12-01This patch refactors execTuples.c in two ways.Bruce Momjian
Neil Conway
2003-12-01This patch adds a new GUC var, "default_with_oids", which follows theBruce Momjian
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
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-11-25Get rid of hashkeys field of Hash plan node, since it's redundant withTom Lane
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.
2003-11-12Cross-data-type comparisons are now indexable by btrees, pursuant to myTom Lane
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.
2003-11-09Add operator strategy and comparison-value datatype fields to ScanKey.Tom Lane
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.
2003-11-06Implement isolation levels read uncommitted and repeatable read as actingPeter Eisentraut
like the next higher one.
2003-10-13Back out makeNode() patch to fix gcc 3.3.1 warning.Bruce Momjian
2003-10-12Use makeNode() to allocate structures that have to be cast to Node *,Bruce Momjian
rather than allocating them on the stack. Fixes complaint from gcc 3.3.1.
2003-10-11Back out -fstrict-aliasing void* casting.Bruce Momjian
2003-10-11This patch will stop gcc from issuing warnings about type-punned objectsBruce Momjian
when -fstrict-aliasing is turned on, as it is in the latest gcc when you use -O2 Andrew Dunstan
2003-10-01Repair RI trigger visibility problems (this time for sure ;-)) per recentTom Lane
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.
2003-09-29I discovered that TupleDescGetAttInMetadata and BuildTupleFromCStringsBruce Momjian
don't deal well with tuples having dropped columns. The attached fixes the issue. Please apply. Joe Conway
2003-09-26Fix tid scan evaluation of non-constant TID values; can't try to do itTom Lane
during ExecInitTidScan, because the rest of the executor isn't ready.
2003-09-25Make the world safe (more or less) for dropped columns in plpgsql rowtypes.Tom Lane
2003-09-25tlist_matches_tupdesc() needs to defend itself against dropped columns.Tom Lane
2003-09-25Get rid of ReferentialIntegritySnapshotOverride by extending Executor APITom Lane
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.
2003-09-25Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
2003-09-24Repair some REINDEX problems per recent discussions. The relcache isTom Lane
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.
2003-09-23_SPI_cursor_operation forgot to check for failure return fromTom Lane
_SPI_begin_call. Per gripe from Tomasz Myrta.
2003-09-16Since SPI_modifytuple's natts argument is the number of attributes to beTom Lane
changed, it should allow a zero value (implying no changes to make).
2003-09-15Fix LISTEN/NOTIFY race condition reported by Gavin Sherry. While aTom Lane
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?)
2003-09-15OK, some of these syntax errors should be given other codes.Peter Eisentraut
2003-09-09Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut
feature they complain about isn't a feature or cannot be implemented without definitional changes.
2003-08-22Tweak processing of multiple-index-scan plans to reduce overhead whenTom Lane
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.
2003-08-19Improve dynahash.c's API so that caller can specify the comparison functionTom Lane
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.
2003-08-17Fix ARRAY[] construct so that in multidimensional case, elements canTom Lane
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
2003-08-11Code cleanup inspired by recent resname bug report (doesn't fix the bugTom Lane
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().
2003-08-08Another pgindent run with updated typedefs.Bruce Momjian
2003-08-08Fix nasty little order-of-operations bug in _SPI_cursor_operation.Tom Lane
Per report from Mendola Gaetano.
2003-08-08Suppress unused-variable warnings when building without Asserts.Tom Lane
2003-08-06Rename fields of DestReceiver to avoid collisions with (ill-considered)Tom Lane
macros in some platforms' sys/socket.h.
2003-08-04Fix some copyright notices that weren't updated. Improve copyright toolTom Lane
so it won't miss 'em again.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-08-01Adjust 'permission denied' messages to be more useful and consistent.Tom Lane
2003-07-30Cause ARRAY[] construct to return a NULL array, rather than raising anTom Lane
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.
2003-07-28Add error stack traceback support for SQL-language functions.Tom Lane