aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Code coverage testing with gcov. Documentation is in the regression testPeter Eisentraut2008-09-05
| | | | | | chapter. Author: Michelle Caisse <Michelle.Caisse@Sun.COM>
* Fix strategy propagation to scanEntry for partial match by moving propagationTeodor Sigaev2008-09-04
| | | | to initializaion of scanEntry.
* If a loadable module has wrong values in its magic block, spell outTom Lane2008-09-03
| | | | | exactly what they are in the complaint message. Marko Kreen, some editorialization by me.
* Prevent memory leaks in our various bison parsers when an error occursTom Lane2008-09-02
| | | | | | | during parsing. Formerly the parser's stack was allocated with malloc and so wouldn't be reclaimed; this patch makes it use palloc instead, so that flushing the current context will reclaim the memory. Per Marko Kreen.
* Fix plpgsql's exec_move_row() to supply valid type OIDs to exec_assign_value()Tom Lane2008-09-01
| | | | | | | | | | whenever possible, as per bug report from Oleg Serov. While at it, reorder the operations in the RECORD case to avoid possible palloc failure while the variable update is only partly complete. Back-patch as far as 8.1. Although the code of the particular function is similar in 8.0, 8.0's support for composite fields in rows is sufficiently broken elsewhere that it doesn't seem worth fixing this.
* Sigh, I missed checking the ecpg tests ...Tom Lane2008-09-01
|
* Add a variant expected-output file for the sequence regression test, to coverTom Lane2008-09-01
| | | | | | | output that is seen when a checkpoint occurs at just the right time during the test. Per my report of 2008-08-31. This could be back-patched but I'm not sure it's worth the trouble.
* Add a bunch of new error location reports to parse-analysis error messages.Tom Lane2008-09-01
| | | | | There are still some weak spots around JOIN USING and relation alias lists, but most errors reported within backend/parser/ now have locations.
* HeapTupleHeaderAdjustCmax made the incorrect assumption that the rawHeikki Linnakangas2008-09-01
| | | | | | | | | command id is the cmin, when it can in fact be a combo cid. That made rows incorrectly invisible to a transaction where a tuple was deleted by multiple aborted subtransactions. Report and patch Karl Schnaitter. Back-patch to 8.3, where combo cids was introduced.
* Synchronize the shared object build rules in Makefile.port with Makefile.shlibPeter Eisentraut2008-09-01
| | | | | somewhat by adding CFLAGS where the compiler is used and Makefile.shlib already used CFLAGS.
* Fix (hopefully) some oversights in recent Bison cleanup patch.Tom Lane2008-08-30
| | | | Per buildfarm results.
* Fix the raw-parsetree representation of star (as in SELECT * FROM orTom Lane2008-08-30
| | | | | | SELECT foo.*) so that it cannot be confused with a quoted identifier "*". Instead create a separate node type A_Star to represent this notation. Per pgsql-hackers discussion of 2007-Sep-27.
* In GCC-based builds, use a better newNode() macro that relies on GCC-specificTom Lane2008-08-29
| | | | | | syntax to avoid a useless store into a global variable. Per experimentation, this works better than my original thought of trying to push the code into an out-of-line subroutine.
* Fixup pg_dumpall adding --lock-wait-timeout, to match pg_dump.Alvaro Herrera2008-08-29
| | | | David Gould
* Suppress gcc warning about possibly-uninitialized variable. It's notTom Lane2008-08-29
| | | | | | | | clear to me why I'd not seen this message before --- on F-9 it seems to only happen if Asserts are disabled, which ought to be irrelevant. Maybe that affects a decision whether to inline get_ten(), which would be needed to expose the warning condition to the compiler? Anyway, the fix is clear.
* Document that \t and \x are now settable.Alvaro Herrera2008-08-29
|
* Remove all traces that suggest that a non-Bison yacc might be supported, andPeter Eisentraut2008-08-29
| | | | | change build system to use only Bison. Simplify build rules, make file names uniform. Don't build the token table header file where it is not needed.
* Extend the parser location infrastructure to include a location field inTom Lane2008-08-28
| | | | | | | | | | | | | most node types used in expression trees (both before and after parse analysis). This allows us to place an error cursor in many situations where we formerly could not, because the information wasn't available beyond the very first level of parse analysis. There's a fair amount of work still to be done to persuade individual ereport() calls to actually include an error location, but this gets the initdb-forcing part of the work out of the way; and the situation is already markedly better than before for complaints about unimplementable implicit casts, such as CASE and UNION constructs with incompatible alternative data types. Per my proposal of a few days ago.
* Teach eval_const_expressions() to simplify an ArrayCoerceExpr to a constantTom Lane2008-08-26
| | | | | | | | when its input is constant and the element coercion function is immutable (or nonexistent, ie, binary-coercible case). This is an oversight in the 8.3 implementation of ArrayCoerceExpr, and its result is that certain cases involving IN or NOT IN with constants don't get optimized as they should be. Per experimentation with an example from Ow Mun Heng.
* Move exprType(), exprTypmod(), expression_tree_walker(), and related routinesTom Lane2008-08-25
| | | | | | into nodes/nodeFuncs, so as to reduce wanton cross-subsystem #includes inside the backend. There's probably more that should be done along this line, but this is a start anyway.
* Get rid of the last remaining uses of var_is_rel(), to wit some debuggingTom Lane2008-08-25
| | | | | | | | | checks in ExecIndexBuildScanKeys() that were inadequate anyway: it's better to verify the correct varno on an expected index key, not just reject OUTER and INNER. This makes the entire current contents of nodeFuncs.c dead code. I'll be replacing it with some other stuff later, as per recent proposal.
* Unconditionally write the statsfile when SIGHUP is received, to minimizeMagnus Hagander2008-08-25
| | | | the window during which backends have no statistics file to read.
* Update URL to Ross William's paper.Alvaro Herrera2008-08-25
| | | | Devrim Gunduz.
* Make stats_temp_directory PGC_SIGHUP, and document how it may cause a temporaryMagnus Hagander2008-08-25
| | | | | | | "outage" of the statistics views. This requires making the stats collector respond to SIGHUP, like the other utility processes already did.
* Convert remaining builtin set-returning functions to use OUT parameters, makingMagnus Hagander2008-08-25
| | | | | | it possible to call them without specifying a column list. Jaime Casanova
* Add missing descriptions for aggregates, functions and conversions.Bruce Momjian2008-08-23
| | | | Bernd Helmle
* Fix possible duplicate tuples while GiST scan. Now page is processedTeodor Sigaev2008-08-23
| | | | | | | | | at once and ItemPointers are collected in memory. Remove tuple's killing by killtuple() if tuple was moved to another page - it could produce unaceptable overhead. Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support.
* Make "log_temp_files" super-user set only, like other logging options.Bruce Momjian2008-08-22
| | | | Simon Riggs
* Minor patch on pgbenchBruce Momjian2008-08-22
| | | | | | | | | | 1. -i option should run vacuum analyze only on pgbench tables, not *all* tables in database. 2. pre-run cleanup step was DELETE FROM HISTORY then VACUUM HISTORY. This is just a slow version of TRUNCATE HISTORY. Simon Riggs
* Improve wording of error message when a postgresql.conf setting isBruce Momjian2008-08-22
| | | | ignored because it can only be set at server start.
* Arrange to convert EXISTS subqueries that are equivalent to hashable INTom Lane2008-08-22
| | | | | | | | | | | | | | | | | | | | | | | subqueries into the same thing you'd have gotten from IN (except always with unknownEqFalse = true, so as to get the proper semantics for an EXISTS). I believe this fixes the last case within CVS HEAD in which an EXISTS could give worse performance than an equivalent IN subquery. The tricky part of this is that if the upper query probes the EXISTS for only a few rows, the hashing implementation can actually be worse than the default, and therefore we need to make a cost-based decision about which way to use. But at the time when the planner generates plans for subqueries, it doesn't really know how many times the subquery will be executed. The least invasive solution seems to be to generate both plans and postpone the choice until execution. Therefore, in a query that has been optimized this way, EXPLAIN will show two subplans for the EXISTS, of which only one will actually get executed. There is a lot more that could be done based on this infrastructure: in particular it's interesting to consider switching to the hash plan if we start out using the non-hashed plan but find a lot more upper rows going by than we expected. I have therefore left some minor inefficiencies in place, such as initializing both subplans even though we will currently only use one.
* Marginal improvement in sublink planning: allow unknownEqFalse optimizationTom Lane2008-08-20
| | | | | | | to be used for SubLinks that are underneath a top-level OR clause. Just as at the very top level of WHERE, it's not necessary to be accurate about whether the sublink returns FALSE or NULL, because either result has the same impact on whether the WHERE will succeed.
* Remove tools and documention for generating TODO.html.Bruce Momjian2008-08-20
|
* Fix obsolete comment. It's no longer the case that Param nodes don'tTom Lane2008-08-20
| | | | carry typmod.
* Synced parser.Michael Meskes2008-08-20
|
* Make libpq on windows not try to send chunks larger than 64Kb.Magnus Hagander2008-08-20
| | | | | | | | | Per Microsoft knowledge base article Q201213, early versions of Windows fail when we do this. Later versions of Windows appear to have a higher limit than 64Kb, but do still fail on large sends, so we unconditionally limit it for all versions. Patch from Tom Lane.
* Cause the output from debug_print_parse, debug_print_rewritten, andTom Lane2008-08-19
| | | | | | | | debug_print_plan to appear at LOG message level, not DEBUG1 as historically. Make debug_pretty_print default to on. Also, cause plans generated via EXPLAIN to be subject to debug_print_plan. This is all to make debug_print_plan a reasonably comfortable substitute for the former behavior of EXPLAIN VERBOSE.
* Fixed incorrect argument handling in SET command if argument is a variable.Michael Meskes2008-08-19
|
* Properly remove src\include\utils\probes.h when running clean.bat.Magnus Hagander2008-08-18
|
* Add some defenses against constant-FALSE outer join conditions. SinceTom Lane2008-08-17
| | | | | | | | | | | | | | | | | eval_const_expressions will generally throw away anything that's ANDed with constant FALSE, what we're left with given an example like select * from tenk1 a where (unique1,0) in (select unique2,1 from tenk1 b); is a cartesian product computation, which is really not acceptable. This is a regression in CVS HEAD compared to previous releases, which were able to notice the impossible join condition in this case --- though not in some related cases that are also improved by this patch, such as select * from tenk1 a left join tenk1 b on (a.unique1=b.unique2 and 0=1); Fix by skipping evaluation of the appropriate side of the outer join in cases where it's demonstrably unnecessary.
* Remove prohibition against SubLinks in the WHERE clause of an EXISTS subqueryTom Lane2008-08-17
| | | | | | that we're considering pulling up. I hadn't wanted to think through whether that could work during the first pass at this stuff. However, on closer inspection it seems to be safe enough.
* Improve sublink pullup code to handle ANY/EXISTS sublinks that are at topTom Lane2008-08-17
| | | | | | | | | | | | | level of a JOIN/ON clause, not only at top level of WHERE. (However, we can't do this in an outer join's ON clause, unless the ANY/EXISTS refers only to the nullable side of the outer join, so that it can effectively be pushed down into the nullable side.) Per request from Kevin Grittner. In passing, fix a bug in the initial implementation of EXISTS pullup: it would Assert if the EXIST's WHERE clause used a join alias variable. Since we haven't yet flattened join aliases when this transformation happens, it's necessary to include join relids in the computed set of RHS relids.
* probes.h is generated from probes.d, not pg_trace.d.Magnus Hagander2008-08-16
|
* Fix pg_dump/pg_restore's ExecuteSqlCommand() to behave suitably if PQexecTom Lane2008-08-16
| | | | | | | returns NULL instead of a PGresult. The former coding would fail, which is OK, but it neglected to give you the PQerrorMessage that might tell you why. In the oldest branches, there was another problem: it'd sometimes report PQerrorMessage from the wrong connection.
* Synchronize Borland libpq makefile to match MSVC. Backpatch to 8.3.X.Bruce Momjian2008-08-16
|
* Fix a couple of places where psql might fail to report a suitable errorTom Lane2008-08-16
| | | | | if PQexec returns NULL. These don't seem significant enough to be worth back-patching, but they ought to get fixed ...
* Fix version warning bug in recently applied adjustments to psql startup.Bruce Momjian2008-08-16
| | | | Gregory Stark
* Clean up the loose ends in selectivity estimation left by my patch for semiTom Lane2008-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and anti joins. To do this, pass the SpecialJoinInfo struct for the current join as an additional optional argument to operator join selectivity estimation functions. This allows the estimator to tell not only what kind of join is being formed, but which variable is on which side of the join; a requirement long recognized but not dealt with till now. This also leaves the door open for future improvements in the estimators, such as accounting for the null-insertion effects of lower outer joins. I didn't do anything about that in the current patch but the information is in principle deducible from what's passed. The patch also clarifies the definition of join selectivity for semi/anti joins: it's the fraction of the left input that has (at least one) match in the right input. This allows getting rid of some very fuzzy thinking that I had committed in the original 7.4-era IN-optimization patch. There's probably room to estimate this better than the present patch does, but at least we know what to estimate. Since I had to touch CREATE OPERATOR anyway to allow a variant signature for join estimator functions, I took the opportunity to add a couple of additional checks that were missing, per my recent message to -hackers: * Check that estimator functions return float8; * Require execute permission at the time of CREATE OPERATOR on the operator's function as well as the estimator functions; * Require ownership of any pre-existing operator that's modified by the command. I also moved the lookup of the functions out of OperatorCreate() and into operatorcmds.c, since that seemed more consistent with most of the other catalog object creation processes, eg CREATE TYPE.
* Performance fix for new anti-join code in nodeMergejoin.c: after finding aTom Lane2008-08-15
| | | | | | | | | | | | | | | | | | match in antijoin mode, we should advance to next outer tuple not next inner. We know we don't want to return this outer tuple, and there is no point in advancing over matching inner tuples now, because we'd just have to do it again if the next outer tuple has the same merge key. This makes a noticeable difference if there are lots of duplicate keys in both inputs. Similarly, after finding a match in semijoin mode, arrange to advance to the next outer tuple after returning the current match; or immediately, if it fails the extra quals. The rationale is the same. (This is a performance bug in existing releases; perhaps worth back-patching? The planner tries to avoid using mergejoin with lots of duplicates, so it may not be a big issue in practice.) Nestloop and hash got this right to start with, but I made some cosmetic adjustments there to make the corresponding bits of logic look more similar.
* Make the temporary directory for pgstat files configurable by the GUCMagnus Hagander2008-08-15
| | | | | | | | variable stats_temp_directory, instead of requiring the admin to mount/symlink the pg_stat_tmp directory manually. For now the config variable is PGC_POSTMASTER. Room for further improvment that would allow it to be changed on-the-fly.