Commit Graph

  • 4c4eb57154 Some marginal additional hacking to shave a few more cycles off heapgettup. Tom Lane 2005-11-26 05:03:06 +00:00
  • 70f1482de3 Change seqscan logic so that we check visibility of all tuples on a page when we first read the page, rather than checking them one at a time. This allows us to take and release the buffer content lock just once per page, instead of once per tuple. Since it's a shared lock the contention penalty for holding the lock longer shouldn't be too bad. We can safely do this only when using an MVCC snapshot; else the assumption that visibility won't change over time is uncool. Therefore there are now two code paths depending on the snapshot type. I also made the same change in nodeBitmapHeapscan.c, where it can be done always because we only support MVCC snapshots for bitmap scans anyway. Also make some incidental cleanups in the APIs of these functions. Per a suggestion from Qingqing Zhou. Tom Lane 2005-11-26 03:03:07 +00:00
  • 290166f934 Teach planner and executor to handle ScalarArrayOpExpr as an indexable qualification when the underlying operator is indexable and useOr is true. That is, indexkey op ANY (ARRAY[...]) is effectively translated into an OR combination of one indexscan for each array element. This only works for bitmap index scans, of course, since regular indexscans no longer support OR'ing of scans. There are still some loose ends to clean up before changing 'x IN (list)' to translate as a ScalarArrayOpExpr; for instance predtest.c ought to be taught about it. But this gets the basic functionality in place. Tom Lane 2005-11-25 19:47:50 +00:00
  • dab52ab13d Improve ExecStoreTuple to be smarter about replacing the contents of a TupleTableSlot: instead of calling ExecClearTuple, inline the needed operations, so that we can avoid redundant steps. In particular, when the old and new tuples are both on the same disk page, avoid releasing and re-acquiring the buffer pin --- this saves work in both the bufmgr and ResourceOwner modules. To make this improvement actually useful, partially revert a change I made on 2004-04-21 that caused SeqNext et al to call ExecClearTuple before ExecStoreTuple. The motivation for that, to avoid grabbing the BufMgrLock separately for releasing the old buffer and grabbing the new one, no longer applies. My profiling says that this saves about 5% of the CPU time for an all-in-memory seqscan. Tom Lane 2005-11-25 04:24:48 +00:00
  • c0a2f8cc4d Add space. Bruce Momjian 2005-11-24 04:40:27 +00:00
  • 3f69c4193f Add item: Bruce Momjian 2005-11-24 04:28:40 +00:00
  • fd3ac58b68 Get rid of ExecAssignResultTypeFromOuterPlan() and make all plan node types generate their output tuple descriptors from their target lists (ie, using ExecAssignResultTypeFromTL()). We long ago fixed things so that all node types have minimally valid tlists, so there's no longer any good reason to have two different ways of doing it. This change is needed to fix bug reported by Hayden James: the fix of 2005-11-03 to emit the correct column names after optimizing away a SubqueryScan node didn't work if the new top-level plan node used ExecAssignResultTypeFromOuterPlan to generate its tupdesc, since the next plan node down won't have the correct column labels. Tom Lane 2005-11-23 20:28:05 +00:00
  • 4dd2048a47 Get rid of ExecAssignResultTypeFromOuterPlan() and make all plan node types generate their output tuple descriptors from their target lists (ie, using ExecAssignResultTypeFromTL()). We long ago fixed things so that all node types have minimally valid tlists, so there's no longer any good reason to have two different ways of doing it. This change is needed to fix bug reported by Hayden James: the fix of 2005-11-03 to emit the correct column names after optimizing away a SubqueryScan node didn't work if the new top-level plan node used ExecAssignResultTypeFromOuterPlan to generate its tupdesc, since the next plan node down won't have the correct column labels. Tom Lane 2005-11-23 20:27:58 +00:00
  • f1e08506e9 Fix problems with rewriter failing to set Query.hasSubLinks when inserting a SubLink expression into a rule query. Pre-8.1 we essentially did this unconditionally; 8.1 tries to do it only when needed, but was missing a couple of cases. Per report from Kyle Bateman. Add some regression test cases covering this area. Tom Lane 2005-11-23 17:21:22 +00:00
  • 19ff959bff Fix problems with rewriter failing to set Query.hasSubLinks when inserting a SubLink expression into a rule query. Pre-8.1 we essentially did this unconditionally; 8.1 tries to do it only when needed, but was missing a couple of cases. Per report from Kyle Bateman. Add some regression test cases covering this area. Tom Lane 2005-11-23 17:21:04 +00:00
  • 45722010ef Having blank lines in -f scripts was causing silent failures. per David Fetter Tatsuo Ishii 2005-11-23 13:23:34 +00:00
  • baa6b22fcb Having blank lines in -f scripts was causing silent failures. per David Fetter Tatsuo Ishii 2005-11-23 12:19:12 +00:00
  • aac96b8994 Fix pgindent of libpq-fe.h by hacking pgindent script. Bruce Momjian 2005-11-23 04:23:30 +00:00
  • ce1d8293f0 Done: > o -Allow NULLs in arrays Bruce Momjian 2005-11-22 23:22:38 +00:00
  • c28c00ecc8 Add: Bruce Momjian 2005-11-22 23:06:56 +00:00
  • e96925fba7 Fix up comment munged by pg_indent. (Not pg_indent's fault; should have protected comment with dashes the first time round.) Tom Lane 2005-11-22 22:30:33 +00:00
  • bef7764835 Re-run pgindent, fixing a problem where comment lines after a blank comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Bruce Momjian 2005-11-22 18:23:31 +00:00
  • 436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Bruce Momjian 2005-11-22 18:17:34 +00:00
  • e196eedd8a Update most recent version number. Bruce Momjian 2005-11-22 16:27:00 +00:00
  • b621efbbb8 Update wording and cleanup for new items. Bruce Momjian 2005-11-22 15:31:23 +00:00
  • 5b352d8e12 DROP DATABASE IF EXISTS variant Andrew Dunstan 2005-11-22 15:24:18 +00:00
  • 179211a683 Markup TODO as a URL. Bruce Momjian 2005-11-22 15:21:54 +00:00
  • d2f568dc6c Fix markup italics problem. Bruce Momjian 2005-11-22 15:17:57 +00:00
  • 2a69a0e147 Update item tags. Bruce Momjian 2005-11-22 15:17:06 +00:00
  • 508f96f529 Change to using "id=" HTML tags instead of "name=" tags. Bruce Momjian 2005-11-22 15:13:02 +00:00
  • 1ab96739be Update FAQ to explain process of submitting bug and feature requests. Bruce Momjian 2005-11-22 15:04:25 +00:00
  • 3c6cd8a113 Fixes motivated by snake and spoonbill pgbuildfarm members Teodor Sigaev 2005-11-22 09:01:35 +00:00
  • 725ace44f9 Reorder "who controls PostgreSQL" to near the top. Bruce Momjian 2005-11-21 21:01:16 +00:00
  • afae55720c Reorder version FAQ item to be right after "how do I get the software". Bruce Momjian 2005-11-21 20:54:26 +00:00
  • ba14edbd5c Clarify copyright wording. Bruce Momjian 2005-11-21 20:51:39 +00:00
  • d253c79a52 Reorder bug items. Bruce Momjian 2005-11-21 20:44:11 +00:00
  • 62699337bc remove forgotten // comments Teodor Sigaev 2005-11-21 18:00:52 +00:00
  • cec3b0a9e6 Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate the process of dropping roles by dropping objects owned by them and privileges granted to them, or giving the owned objects to someone else, through the use of the data stored in the new pg_shdepend catalog. Alvaro Herrera 2005-11-21 12:49:33 +00:00
  • c52795d18a Text parser rewritten: - supports multibyte encodings - more strict rules for lexemes - flex isn't used Add: - tsquery plainto_tsquery(text) Function makes tsquery from plain text. - &&, ||, !! operation for tsquery for combining tsquery from it's parts: 'foo & bar' || 'asd' => 'foo & bar | asd' Teodor Sigaev 2005-11-21 12:27:57 +00:00
  • b91e6ed93e Clean up after DROP IF EXISTS patch. Tom Lane 2005-11-20 23:24:12 +00:00
  • dd218ae7b0 Remove the t_datamcxt field of HeapTupleData. This was introduced for the convenience of tuptoaster.c and is no longer needed, so may as well get rid of some small amount of overhead. Tom Lane 2005-11-20 19:49:08 +00:00
  • c8de36352f Modify tuptoaster's API so that it does not try to modify the passed tuple in-place, but instead passes back an all-new tuple structure if any changes are needed. This is a much cleaner and more robust solution for the bug discovered by Alexey Beschiokov; accordingly, revert the quick hack I installed yesterday. With this change, HeapTupleData.t_datamcxt is no longer needed; will remove it in a separate commit in HEAD only. Tom Lane 2005-11-20 18:38:42 +00:00
  • 40314f2dac Modify tuptoaster's API so that it does not try to modify the passed tuple in-place, but instead passes back an all-new tuple structure if any changes are needed. This is a much cleaner and more robust solution for the bug discovered by Alexey Beschiokov; accordingly, revert the quick hack I installed yesterday. With this change, HeapTupleData.t_datamcxt is no longer needed; will remove it in a separate commit in HEAD only. Tom Lane 2005-11-20 18:38:20 +00:00
  • efd2ae8f19 Stopgap solution for problem reported by Alexey Beschiokov: after doing heap_insert or heap_update, wipe out any extracted fields in the TupleTableSlot containing the tuple, because they might not be valid anymore if tuptoaster.c changed the tuple. Safe because slot must be in the materialized state, but mighty ugly --- find a better answer! Tom Lane 2005-11-19 20:58:42 +00:00
  • 33a9af738d Stopgap solution for problem reported by Alexey Beschiokov: after doing heap_insert or heap_update, wipe out any extracted fields in the TupleTableSlot containing the tuple, because they might not be valid anymore if tuptoaster.c changed the tuple. Safe because slot must be in the materialized state, but mighty ugly --- find a better answer! Tom Lane 2005-11-19 20:57:44 +00:00
  • 659f681638 Change array comparison rules to consider dimensionality information, not only the array contents, before claiming two arrays are equal. Per recent discussion. Tom Lane 2005-11-19 19:44:55 +00:00
  • daea4d8eae DROP objecttype IF EXISTS for the following objects: table view index sequence schema type domain conversion Andrew Dunstan 2005-11-19 17:39:45 +00:00
  • 8ef289dba1 Defend against nulls-in-arrays in contrib/intarray. I may have put in more tests than strictly necessary, but did not feel like tracing call paths in detail ... Tom Lane 2005-11-19 03:00:09 +00:00
  • 25c00833cb Add defenses against nulls-in-arrays to contrib/ltree. Possibly it'd be useful to actually do something with nulls, rather than reject them, but I'll just close the hole for now. Tom Lane 2005-11-19 02:08:45 +00:00
  • 1e9a1a70ad Change array_push and array_cat so that they retain the lower bound of the array (for array_push) or higher-dimensional array (for array_cat) rather than decrementing it as before. This avoids generating lower bounds other than one for any array operation within the SQL spec. Per recent discussion. Interestingly, this seems to have been the original behavior, because while updating the docs I noticed that a large fraction of relevant examples were *wrong* for the old behavior and are now right. Is it worth correcting this in the back-branch docs? Tom Lane 2005-11-19 01:50:08 +00:00
  • e03c5e2d5a Fix performance issue in exprTypmod(): for a COALESCE expression, it recursed twice on its first argument, leading to exponential time spent on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would produce. Per report from Matt Carter. Tom Lane 2005-11-18 23:08:43 +00:00
  • acd3a4f3c5 Fix performance issue in exprTypmod(): for a COALESCE expression, it recursed twice on its first argument, leading to exponential time spent on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would produce. Per report from Matt Carter. Tom Lane 2005-11-18 23:08:28 +00:00
  • dccfa4d3f2 Fix performance issue in exprTypmod(): for a COALESCE expression, it recursed twice on its first argument, leading to exponential time spent on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would produce. Per report from Matt Carter. Tom Lane 2005-11-18 23:08:13 +00:00
  • 8685c47223 Fix performance issue in exprTypmod(): for a COALESCE expression, it recursed twice on its first argument, leading to exponential time spent on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would produce. Per report from Matt Carter. Tom Lane 2005-11-18 23:08:00 +00:00
  • b410475672 translate undef to NULL for result arrayref, now that we allow NULLs in arrays. Update plperl regression test accordingly. Andrew Dunstan 2005-11-18 17:00:28 +00:00
  • 33e9f2c3d4 Add tab completion for RESET SESSION AUTHORIZATION. Alvaro Herrera 2005-11-18 16:31:11 +00:00
  • 7871b7defc Update obsolete comment describing ExecDelete(), per Simon Riggs. Neil Conway 2005-11-18 12:26:20 +00:00
  • 1d0d8d3c38 Mop-up for nulls-in-arrays patch: fix some places that access array contents directly. Tom Lane 2005-11-18 02:38:24 +00:00
  • 1012a93264 Update Japanese FAQ. Bruce Momjian 2005-11-18 00:41:26 +00:00
  • 3201b7f3d0 Update Japanese FAQ. Bruce Momjian 2005-11-18 00:40:46 +00:00
  • eed9eb446a make psql honor explicit database parameter in -l mode, in case "postgres" database is missing - per complaint from Philip Yarra. Andrew Dunstan 2005-11-17 23:49:44 +00:00
  • b7a9e3ceb4 make psql honor explicit database parameter in -l mode, in case "postgres" database is missing - per complaint from Philip Yarra. Andrew Dunstan 2005-11-17 23:42:26 +00:00
  • cecb607559 Make SQL arrays support null elements. This commit fixes the core array functionality, but I still need to make another pass looking at places that incidentally use arrays (such as ACL manipulation) to make sure they are null-safe. Contrib needs work too. I have not changed the behaviors that are still under discussion about array comparison and what to do with lower bounds. Tom Lane 2005-11-17 22:14:56 +00:00
  • be324ad2ab DropRelFileNodeBuffers failed to fix the state of the lookup hash table that was added to localbuf.c in 8.1; therefore, applying it to a temp table left corrupt lookup state in memory. The only case where this had a significant chance of causing problems was an ON COMMIT DELETE ROWS temp table; the other possible paths left bogus state that was unlikely to be used again. Per report from Csaba Nagy. Tom Lane 2005-11-17 17:42:24 +00:00
  • c859308aba DropRelFileNodeBuffers failed to fix the state of the lookup hash table that was added to localbuf.c in 8.1; therefore, applying it to a temp table left corrupt lookup state in memory. The only case where this had a significant chance of causing problems was an ON COMMIT DELETE ROWS temp table; the other possible paths left bogus state that was unlikely to be used again. Per report from Csaba Nagy. Tom Lane 2005-11-17 17:42:02 +00:00
  • 84bb3876bc Update, add mention of user locking table before MERGE: Bruce Momjian 2005-11-16 18:45:09 +00:00
  • 175ab4c00c make_restrictinfo() failed to attach the specified required_relids to its result when the clause was an OR clause. Brain fade exposed by example from Sebastian BÎck. Tom Lane 2005-11-16 17:08:12 +00:00
  • ccdcd19672 make_restrictinfo() failed to attach the specified required_relids to its result when the clause was an OR clause. Brain fade exposed by example from Sebastian BÎck. Tom Lane 2005-11-16 17:08:03 +00:00
  • 01798a06b9 Add batch mode, make new libpq section: Bruce Momjian 2005-11-16 16:33:44 +00:00
  • 2feb930af6 Fix comment on -v option Tatsuo Ishii 2005-11-16 13:13:08 +00:00
  • 62b91ec937 Properly document return value of strpos(). Bruce Momjian 2005-11-16 03:58:08 +00:00
  • 48fabd257f Properly document return value of strpos(). Bruce Momjian 2005-11-16 03:56:52 +00:00
  • 1cb945bd50 Properly document return value of strpos(). Bruce Momjian 2005-11-16 03:56:35 +00:00
  • 04ce3cb02d Properly document return value of strpos(). Bruce Momjian 2005-11-16 03:56:16 +00:00
  • f583cbc8a0 Properly document return value of strpos(). Bruce Momjian 2005-11-16 03:56:08 +00:00
  • a99f293753 Update error message and documentation for fsync test. Bruce Momjian 2005-11-16 03:44:51 +00:00
  • 558c4367e7 Update error message and documentation for fsync test. Bruce Momjian 2005-11-16 03:32:04 +00:00
  • 4bc4ce01a7 Update test_fsync to honor -f. Bruce Momjian 2005-11-16 01:34:11 +00:00
  • e68974665b Have test_fsync honor -f filename argument. Bruce Momjian 2005-11-16 01:31:14 +00:00
  • 46117e4f2a Have test_fsync honor -f filename argument. Bruce Momjian 2005-11-16 01:31:07 +00:00
  • 698ee9c3e7 Update MERGE: Bruce Momjian 2005-11-15 23:08:24 +00:00
  • 788f7c63a1 Add reminder that we should link to the documentation section for new features. Bruce Momjian 2005-11-15 22:16:03 +00:00
  • b064cf0b7c Prevent certain symbols that are used for both typedefs and variable names from being added to pgindent's typedef list. The existance of them caused weird formatting in the date/type files, and in keywords.c. Bruce Momjian 2005-11-15 14:45:14 +00:00
  • 62fb1d6028 Prevent certain symbols that are used for both typedefs and variable names from being added to pgindent's typedef list. The existance of them caused weird formatting in the date/type files, and in keywords.c. Bruce Momjian 2005-11-15 14:45:10 +00:00
  • b2625c13e0 Fix recent problems with BSD indent, including indenting past 80 columns, shifting comment to the right when more than 150 'else if' clauses were used, and update typedefs for 8.1.X. Bruce Momjian 2005-11-15 01:02:13 +00:00
  • 02c43ffbec Fix recent problems with BSD indent, including indenting past 80 columns, shifting comment to the right when more than 150 'else if' clauses were used, and update typedefs for 8.1.X. Bruce Momjian 2005-11-15 00:43:01 +00:00
  • 659d3b2b0e Restore the former RestrictInfo field valid_everywhere (but invert the flag sense and rename to "outerjoin_delayed" to more clearly reflect what it means). I had decided that it was redundant in 8.1, but the folly of this is exposed by a bug report from Sebastian Böck. The place where it's needed is to prevent orindxpath.c from cherry-picking arms of an outer-join OR clause to form a relation restriction that isn't actually legal to push down to the relation scan level. There may be some legal cases that this forbids optimizing, but we'd need much closer analysis to determine it. Tom Lane 2005-11-14 23:54:36 +00:00
  • 1bdf124b94 Restore the former RestrictInfo field valid_everywhere (but invert the flag sense and rename to "outerjoin_delayed" to more clearly reflect what it means). I had decided that it was redundant in 8.1, but the folly of this is exposed by a bug report from Sebastian Böck. The place where it's needed is to prevent orindxpath.c from cherry-picking arms of an outer-join OR clause to form a relation restriction that isn't actually legal to push down to the relation scan level. There may be some legal cases that this forbids optimizing, but we'd need much closer analysis to determine it. Tom Lane 2005-11-14 23:54:23 +00:00
  • c42d633352 Translation typo fix Alvaro Herrera 2005-11-14 22:08:29 +00:00
  • e93fb885eb Translation typo fix Alvaro Herrera 2005-11-14 22:08:14 +00:00
  • c5686b2904 Re-run pgindent to fix breakage when exceeding 150 'else if' clauses. Bruce Momjian 2005-11-14 17:48:43 +00:00
  • 2286192feb Re-run pgindent to fix breakage when exceeding 150 'else if' clauses. Bruce Momjian 2005-11-14 17:46:07 +00:00
  • 431178ae67 Prevent ExecInsert() and ExecUpdate() from scribbling on the result tuple slot of the topmost plan node when a trigger returns a modified tuple. These appear to be the only places where a plan node's caller did not treat the result slot as read-only, which is an assumption that nodeUnique makes as of 8.1. Fixes trigger-vs-DISTINCT bug reported by Frank van Vugt. Tom Lane 2005-11-14 17:43:13 +00:00
  • 76ce39e386 Prevent ExecInsert() and ExecUpdate() from scribbling on the result tuple slot of the topmost plan node when a trigger returns a modified tuple. These appear to be the only places where a plan node's caller did not treat the result slot as read-only, which is an assumption that nodeUnique makes as of 8.1. Fixes trigger-vs-DISTINCT bug reported by Frank van Vugt. Tom Lane 2005-11-14 17:42:55 +00:00
  • 08ee64ebf5 Remove usage of ArrayType->flags field, use pgsql's macros BITS_PER_BYTE instead of self-defined macros, add limit of Array to gist__int_ops. BTW, intarray now doesn't support NULLs in arrays. Teodor Sigaev 2005-11-14 16:11:37 +00:00
  • bad1a5c217 Use postgres-wide macros BITS_PER_BYTE instead self-definenig macros, also use it for calculating bit length of TPQTGist Teodor Sigaev 2005-11-14 14:44:06 +00:00
  • 34b934f658 fix returning value Teodor Sigaev 2005-11-14 09:59:13 +00:00
  • c7d40ff35f Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid surprising results when it's some other numeric type. This doesn't solve the generic problem of surprising implicit casts to text, but it's a low-impact way of making sure this particular case behaves sanely. Per gripe from Harald Fuchs and subsequent discussion. Tom Lane 2005-11-13 19:12:05 +00:00
  • f82df77c9d Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid surprising results when it's some other numeric type. This doesn't solve the generic problem of surprising implicit casts to text, but it's a low-impact way of making sure this particular case behaves sanely. Per gripe from Harald Fuchs and subsequent discussion. Tom Lane 2005-11-13 19:11:45 +00:00
  • b31eeadcab Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid surprising results when it's some other numeric type. This doesn't solve the generic problem of surprising implicit casts to text, but it's a low-impact way of making sure this particular case behaves sanely. Per gripe from Harald Fuchs and subsequent discussion. Tom Lane 2005-11-13 19:11:28 +00:00
  • 53de65af49 Revert pgindent length back to 79 because we are going to fix the BSD indent bug. Bruce Momjian 2005-11-13 02:42:24 +00:00
  • 19cb457146 Revert pgindent length back to 79 because we are going to fix the BSD indent bug. Bruce Momjian 2005-11-13 02:38:49 +00:00
  • 6f90fd6948 add missing quote mark to ident_file sample line - per Hiroshi Saito Andrew Dunstan 2005-11-10 14:02:59 +00:00
  • f9db22e88e add missing quote mark to ident_file sample line - per Hiroshi Saito Andrew Dunstan 2005-11-10 14:01:55 +00:00
  • 63b2342072 When in transaction-aborted state, reject Bind message for portals containing anything but transaction-exiting commands (ROLLBACK etc). We already rejected Parse and Execute in such cases, so there seems little point in allowing Bind. This prevents at least an Assert failure, and probably worse things, since there's a lot of infrastructure that doesn't work when not in a live transaction. We can also simplify the Bind logic a bit by rejecting messages with a nonzero number of parameters, instead of the former kluge to silently substitute NULL for each parameter. Per bug #2033 from Joel Stevenson. Tom Lane 2005-11-10 00:31:59 +00:00