Commit Graph

  • 8cb4e4f6bd Add regression test to see if the min/max values of int8 convert correctly. Tom Lane 2005-12-05 04:13:38 +00:00
  • fcda95d987 Fix a rather sizable number of problems in our homegrown snprintf, such as incorrect implementation of argument reordering, arbitrary limit of output size for sprintf and fprintf, willingness to access more bytes than "%.Ns" specification allows, wrong formatting of LONGLONG_MIN, various field-padding bugs and omissions. I believe it now accurately implements a subset of the Single Unix Spec requirements (remaining unimplemented features are documented, too). Bruce Momjian and Tom Lane. Tom Lane 2005-12-05 02:39:43 +00:00
  • 3311c7669a Fix a rather sizable number of problems in our homegrown snprintf, such as incorrect implementation of argument reordering, arbitrary limit of output size for sprintf and fprintf, willingness to access more bytes than "%.Ns" specification allows, wrong formatting of LONGLONG_MIN, various field-padding bugs and omissions. I believe it now accurately implements a subset of the Single Unix Spec requirements (remaining unimplemented features are documented, too). Bruce Momjian and Tom Lane. Tom Lane 2005-12-05 02:39:38 +00:00
  • 99552287e1 Update: Bruce Momjian 2005-12-04 21:16:51 +00:00
  • 8752479dfc Add: Bruce Momjian 2005-12-04 04:33:18 +00:00
  • bedb5fc309 Add: Bruce Momjian 2005-12-04 04:14:43 +00:00
  • 49bbff0f8d Add for autovacuum: Bruce Momjian 2005-12-04 04:02:55 +00:00
  • 10e3d224e0 Add configure flag to allow libedit to be preferred over GNU readline: Bruce Momjian 2005-12-04 03:52:29 +00:00
  • 3824460544 Two fixes from Tom Lan. See the posting "[PATCHES] A couple of proposed pgbench changes" on 2005/11/29 for more details. Tatsuo Ishii 2005-12-04 01:22:42 +00:00
  • e4a9229d55 Treat procedural languages as owned by the bootstrap superuser, rather than owned by nobody. This results in cleaner display of language ACLs, since the backend's aclchk.c uses the same convention. AFAICS there is no practical difference but it's nice to avoid emitting SET SESSION AUTHORIZATION; also this will make it easier to transition pg_dump to some future version in which we may include an explicit ownership column in pg_language. Per gripe from David Begley. Tom Lane 2005-12-03 21:06:18 +00:00
  • 22868b9e39 Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. Per example from Dirk Pirschel. Tom Lane 2005-12-03 20:17:00 +00:00
  • 91ab1fefbd Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. Per example from Dirk Pirschel. Tom Lane 2005-12-03 20:16:50 +00:00
  • a9bdac055c Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. Per example from Dirk Pirschel. Tom Lane 2005-12-03 20:16:39 +00:00
  • 6d4bcda38c Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. Per example from Dirk Pirschel. Tom Lane 2005-12-03 20:16:31 +00:00
  • dfdec60447 Allow to_char(interval) and to_char(time) to use AM/PM specifications. Map them to a single day, so '30 hours' is 'AM'. Bruce Momjian 2005-12-03 16:45:23 +00:00
  • d20901a39b Allow to_char(interval) and to_char(time) to use AM/PM specifications. Map them to a single day, so '30 hours' is 'AM'. Bruce Momjian 2005-12-03 16:45:06 +00:00
  • eb339c7840 Item removed: Bruce Momjian 2005-12-03 13:03:41 +00:00
  • a98871b7ac Tweak indexscan machinery to avoid taking an AccessShareLock on an index if we already have a stronger lock due to the index's table being the update target table of the query. Same optimization I applied earlier at the table level. There doesn't seem to be much interest in the more radical idea of not locking indexes at all, so do what we can ... Tom Lane 2005-12-03 05:51:03 +00:00
  • b0be56634b Fix obsolete description of -h option, per Andreas Schmidt. Tom Lane 2005-12-02 23:14:02 +00:00
  • 4ed2e803ef Fix obsolete description of -h option, per Andreas Schmidt. Tom Lane 2005-12-02 23:13:53 +00:00
  • 1cf65140d0 Fix obsolete description of -h option, per Andreas Schmidt. Tom Lane 2005-12-02 23:13:46 +00:00
  • 6f5efe3d16 Fix obsolete comment. Tom Lane 2005-12-02 22:06:07 +00:00
  • d780f07ac1 Adjust scan plan nodes to avoid getting an extra AccessShareLock on a relation if it's already been locked by execMain.c as either a result relation or a FOR UPDATE/SHARE relation. This avoids an extra trip to the shared lock manager state. Per my suggestion yesterday. Tom Lane 2005-12-02 20:03:42 +00:00
  • 5ab2598875 Remove idea of increasing NUMERIC length: Bruce Momjian 2005-12-02 17:39:44 +00:00
  • 43a10d3a16 Added special handling of CONNECTION variable that is used by ECPG instead of given to the backend. I failed to notice that CONNECTION had become a keyword in 8.1. Michael Meskes 2005-12-02 15:04:48 +00:00
  • 5106aff99a Added special handling of CONNECTION variable that is used by ECPG instead of given to the backend. Michael Meskes 2005-12-02 15:03:57 +00:00
  • 9322a04759 Add calcluation of bitmap storage capacity. Bruce Momjian 2005-12-02 04:28:19 +00:00
  • cf17131767 Remove comment on errno=0 lines, but add mention to port/strtol.c function. Bruce Momjian 2005-12-02 02:49:11 +00:00
  • 2913b95308 Rearrange code in ExecInitBitmapHeapScan so that we don't initialize the child plan nodes until we have acquired lock on the relation to scan. The relative order of initialization of plan nodes isn't real important in other cases, but it's critical here because one is supposed to lock a relation before its indexes, not vice versa. The original coding was at least vulnerable to deadlock against DROP INDEX, and perhaps worse things. Tom Lane 2005-12-02 01:30:26 +00:00
  • de1dfc1209 Rearrange code in ExecInitBitmapHeapScan so that we don't initialize the child plan nodes until we have acquired lock on the relation to scan. The relative order of initialization of plan nodes isn't real important in other cases, but it's critical here because one is supposed to lock a relation before its indexes, not vice versa. The original coding was at least vulnerable to deadlock against DROP INDEX, and perhaps worse things. Tom Lane 2005-12-02 01:29:55 +00:00
  • 113ece8f3d Add all heap page rows visible bitmap idea: Bruce Momjian 2005-12-01 22:30:43 +00:00
  • 915fb7f687 Add MERGE TODO.detail: Bruce Momjian 2005-12-01 22:12:35 +00:00
  • f28bdd95c1 Add merge TODO.detail item. Bruce Momjian 2005-12-01 22:12:06 +00:00
  • 24e1a04591 Split out MERGE and REPLACE/UPSERT items. Bruce Momjian 2005-12-01 22:07:59 +00:00
  • 8c8c0108e8 Add comment to pg_atoi. Bruce Momjian 2005-12-01 21:16:13 +00:00
  • 0e6b1528b7 Comment "errno = 0" in a more generic way. Bruce Momjian 2005-12-01 21:11:58 +00:00
  • eeae797d33 Retry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES. Also add a retry for Unixen returning EINTR, which hasn't been reported as an issue but at least theoretically could be. Patch by Qingqing Zhou, some minor adjustments by me. Tom Lane 2005-12-01 20:24:49 +00:00
  • 3ece85f8bf Retry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES. Also add a retry for Unixen returning EINTR, which hasn't been reported as an issue but at least theoretically could be. Patch by Qingqing Zhou, some minor adjustments by me. Tom Lane 2005-12-01 20:24:31 +00:00
  • ace17c1d82 Retry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES. Also add a retry for Unixen returning EINTR, which hasn't been reported as an issue but at least theoretically could be. Patch by Qingqing Zhou, some minor adjustments by me. Tom Lane 2005-12-01 20:24:18 +00:00
  • 277b2ea328 Add comments about why errno is set to zero. Bruce Momjian 2005-12-01 20:06:37 +00:00
  • 22fff8b9f1 Check for overflow in strtol() while parsing datetime inputs. Michael Fuhr. Tom Lane 2005-12-01 17:57:07 +00:00
  • 64c09adea7 Check for overflow in strtol() while parsing datetime inputs. Michael Fuhr. Tom Lane 2005-12-01 17:56:54 +00:00
  • 963a811a67 Check for overflow in strtol() while parsing datetime inputs. Michael Fuhr. Tom Lane 2005-12-01 17:56:43 +00:00
  • 814acfcc3a Check for overflow in strtol() while parsing datetime inputs. Michael Fuhr. Tom Lane 2005-12-01 17:56:34 +00:00
  • bc0b56c0fe Fix typo in PL/PgSQL documentation, per Chris KL. Neil Conway 2005-12-01 10:38:09 +00:00
  • cab40818ea Fix typo in PL/PgSQL documentation, per Chris KL. Neil Conway 2005-12-01 10:36:57 +00:00
  • 7415e083e4 Refactor some bits in aclchk.c in order to reduce code duplication. Alvaro Herrera 2005-12-01 02:03:01 +00:00
  • a4a51d58e8 Rearrange code in pg_atoi() to avoid assuming that isspace() cannot change errno. No reported bugs here, but why take a chance? Tom Lane 2005-11-30 23:10:34 +00:00
  • 29ebf0df81 Rearrange code in pg_atoi() to avoid assuming that isspace() cannot change errno. No reported bugs here, but why take a chance? Tom Lane 2005-11-30 23:10:16 +00:00
  • 164442fe7f Rearrange code in pg_atoi() to avoid assuming that isspace() cannot change errno. No reported bugs here, but why take a chance? Tom Lane 2005-11-30 23:10:08 +00:00
  • 2883fbb808 Tweak choose_bitmap_and() heuristics in the light of example provided in bug #2075: consider an index redundant if any of its index conditions were already used, rather than if all of them were. Also, make the selectivity comparison a bit fuzzy, so that very small differences in estimated selectivities don't skew the results. Tom Lane 2005-11-30 17:10:25 +00:00
  • bae3fefd4a Tweak choose_bitmap_and() heuristics in the light of example provided in bug #2075: consider an index redundant if any of its index conditions were already used, rather than if all of them were. Also, make the selectivity comparison a bit fuzzy, so that very small differences in estimated selectivities don't skew the results. Tom Lane 2005-11-30 17:10:19 +00:00
  • f9bdaeeb34 - Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>. - Replaced all strdup() calls by ECPGstrdup(). Michael Meskes 2005-11-30 12:51:07 +00:00
  • dd13bf167b - Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>. - Replaced all strdup() calls by ECPGstrdup(). Michael Meskes 2005-11-30 12:50:37 +00:00
  • 150131d9d9 - Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>. - Replaced all strdup() calls by ECPGstrdup(). - Set ecpg library version to 5.2. - Set ecpg version to 4.2.1. Michael Meskes 2005-11-30 12:49:49 +00:00
  • 339fbbb9a0 Update for 8.2: Bruce Momjian 2005-11-29 02:02:40 +00:00
  • 8ed7065c7b Item removed, looping always required: Bruce Momjian 2005-11-29 02:01:52 +00:00
  • 19fecee06e Document PGXS' REGRESS feature. Alvaro Herrera 2005-11-29 01:46:54 +00:00
  • 9a39423436 Fix EXPLAIN and EXECUTE commands to pass portal parameters through to the executor. This allows, for example, JDBC clients to use '?' bound parameters in these commands. Per gripe from Virag Saksena. Tom Lane 2005-11-29 01:25:50 +00:00
  • c4279b45fd Tweak hash join code to use an additional heuristic for deciding whether it's worth probing the outer relation for emptiness before building the hash table. To wit, if we're rescanning a join previously performed, remember whether we found it nonempty the previous time, and don't bother with the probe if it was nonempty. This buys back the performance lost in examples like Mario Weilguni's. Tom Lane 2005-11-28 23:46:25 +00:00
  • 4ab76b1c20 Tweak hash join code to use an additional heuristic for deciding whether it's worth probing the outer relation for emptiness before building the hash table. To wit, if we're rescanning a join previously performed, remember whether we found it nonempty the previous time, and don't bother with the probe if it was nonempty. This buys back the performance lost in examples like Mario Weilguni's. Tom Lane 2005-11-28 23:46:03 +00:00
  • fc9b777a79 Improve documentation for COALESCE and NULLIF. Add references for NVL and IFNULL. Bruce Momjian 2005-11-28 23:19:03 +00:00
  • ee4aa3021e Improve documentation for COALESCE and NULLIF. Add references for NVL and IFNULL. Bruce Momjian 2005-11-28 23:18:48 +00:00
  • 200545039c Come to think of it, the backend doesn't use -lz either. Tom Lane 2005-11-28 22:43:30 +00:00
  • a4371a6813 Add: Bruce Momjian 2005-11-28 22:21:58 +00:00
  • a2c43740d5 Don't link readline and supporting libraries into the backend. After a proposal by Martijn van Oosterhout (not exactly his patch though). Tom Lane 2005-11-28 22:06:39 +00:00
  • 8f105ad65c Install a more future-proof fix for the snapshot-unset bug just found. Per suggestion from Tom Lane. Alvaro Herrera 2005-11-28 17:23:12 +00:00
  • f1713078c5 Install a more future-proof fix for the snapshot-unset bug just found. Per suggestion from Tom Lane. Alvaro Herrera 2005-11-28 17:23:11 +00:00
  • 7e3cdc631e Recent changes to allow hash join to exit early given empty input from one child or the other had a problem: they did not leave the node in a state that ExecReScanHashJoin would understand. In particular it would tend to fail to reset the child plans when needed. Per report from Mario Weilguni. Tom Lane 2005-11-28 17:14:47 +00:00
  • b79cb1eea1 Recent changes to allow hash join to exit early given empty input from one child or the other had a problem: they did not leave the node in a state that ExecReScanHashJoin would understand. In particular it would tend to fail to reset the child plans when needed. Per report from Mario Weilguni. Tom Lane 2005-11-28 17:14:23 +00:00
  • d4fc4ac4c7 Set a snapshot before running analyze on a single table, to avoid a crash when analyzing tables with expressional indexes. Alvaro Herrera 2005-11-28 13:35:09 +00:00
  • 4123dbb75d Set a snapshot before running analyze on a single table, to avoid a crash when analyzing tables with expressional indexes. Alvaro Herrera 2005-11-28 13:34:10 +00:00
  • ec9f81b4ae Install pg_regress where PGXS' "make installcheck" can find it. Alvaro Herrera 2005-11-28 12:03:56 +00:00
  • 3d376fce8d Change the parser to translate "foo [NOT] IN (expression-list)" to ScalarArrayOpExpr when possible, that is, whenever there is an array type for the values of the expression list. This completes the project I've been working on to improve the speed of index searches with long IN lists, as per discussion back in mid-October. Tom Lane 2005-11-28 04:35:32 +00:00
  • 8a9acd3c41 Teach predtest.c how to reason about ScalarArrayOpExpr clauses as though they were broken-out AND or OR lists. The least grotty way to do this seemed to be to set up a general mechanism for handling nodes as though they were ANDs or ORs. There's no other immediate use for it, but perhaps we might want to use the mechanism someday for things like BETWEEN SYMMETRIC. Tom Lane 2005-11-27 22:15:42 +00:00
  • 73fa3d9a96 Add missing semicolon. Recent versions of bison seem to choke on this, per buildfarm report from platypus, even though older versions let it pass. Tom Lane 2005-11-27 01:22:36 +00:00
  • 1b68a88f22 Add missing semicolon. Recent versions of bison seem to choke on this, per buildfarm report from platypus, even though older versions let it pass. Tom Lane 2005-11-27 01:22:23 +00:00
  • da27c0a1ef Teach tid-scan code to make use of "ctid = ANY (array)" clauses, so that "ctid IN (list)" will still work after we convert IN to ScalarArrayOpExpr. Make some minor efficiency improvements while at it, such as ensuring that multiple TIDs are fetched in physical heap order. And fix EXPLAIN so that it shows what's really going on for a TID scan. Tom Lane 2005-11-26 22:14:57 +00:00
  • a66e2c8885 Teach push_nots() how to negate a ScalarArrayOpExpr. In passing, save a palloc or two in the OpExpr case. Tom Lane 2005-11-26 18:07:40 +00:00
  • 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