aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix "cannot handle unplanned sub-select" error that can occur when aTom Lane2010-07-08
| | | | | | | | | sub-select contains a join alias reference that expands into an expression containing another sub-select. Per yesterday's report from Merlin Moncure and subsequent off-list investigation. Back-patch to 7.4. Older versions didn't attempt to flatten sub-selects in ways that would trigger this problem.
* The previous fix in CVS HEAD and 8.4 for handling the case where a cursorHeikki Linnakangas2010-07-05
| | | | | | | | | | | being used in a PL/pgSQL FOR loop is closed was inadequate, as Tom Lane pointed out. The bug affects FOR statement variants too, because you can close an implicitly created cursor too by guessing the "<unnamed portal X>" name created for it. To fix that, "pin" the portal to prevent it from being dropped while it's being used in a PL/pgSQL FOR loop. Backpatch all the way to 7.4 which is the oldest supported version.
* Allow REASSIGNED OWNED to handle opclasses and opfamilies.Robert Haas2010-07-03
| | | | | | | | Backpatch to 8.3, which is as far back as we have opfamilies. The opclass portion could probably be backpatched to 8.2, when REASSIGN OWNED was added, but for now I have not done that. Asko Tiidumaa, with minor adjustments by me.
* Fix assorted misstatements and poor wording in the descriptions of the I/OTom Lane2010-07-03
| | | | | | | | | formats for geometric types. Per bug #5536 from Jon Strait, and my own testing. Back-patch to all supported branches, since this doco has been wrong right along -- we certainly haven't changed the I/O behavior of these types in many years.
* Unbreak MSVC builds by removing copydir.c from list of libpgport filesAndrew Dunstan2010-07-03
|
* Move copydir.c from src/port to src/backend/storage/fileRobert Haas2010-07-02
| | | | | | | | | | | | | The previous commit to make copydir() interruptible prevented postgres.exe from linking on MinGW and Cygwin, because on those platforms libpgport_srv.a can't freely reference symbols defined by the backend. Since that code is already backend-specific anyway, just move the whole file into the backend rather than adding further kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS(). This probably needs some further cleanup, but this commit just moves the file as-is, which should hopefully be enough to turn the buildfarm green again.
* Allow copydir() to be interrupted.Robert Haas2010-07-01
| | | | | | | | | This makes ALTER DATABASE .. SET TABLESPACE and CREATE DATABASE more sensitive to interrupts. Backpatch to 8.4, where ALTER DATABASE .. SET TABLESPACE was introduced. We could go back further, but in the absence of complaints about the CREATE DATABASE case it doesn't seem worth it. Guillaume Lelarge, with a small correction by me.
* Allow ALTER TABLE .. SET TABLESPACE to be interrupted.Robert Haas2010-07-01
| | | | | | Backpatch to 8.0, where tablespaces were introduced. Guillaume Lelarge
* stringToNode() and deparse_expression_pretty() crash on invalid input,Heikki Linnakangas2010-06-30
| | | | | | | | | | but we have nevertheless exposed them to users via pg_get_expr(). It would be too much maintenance effort to rigorously check the input, so put a hack in place instead to restrict pg_get_expr() so that the argument must come from one of the system catalog columns known to contain valid expressions. Per report from Rushabh Lathia. Backpatch to 7.4 which is the oldest supported version at the moment.
* Improve pg_dump's checkSeek() function to verify the functioning of ftelloTom Lane2010-06-28
| | | | | | | | | | as well as fseeko, and to not assume that fseeko(fp, 0, SEEK_CUR) proves anything. Also improve some related comments. Per my observation that the SEEK_CUR test didn't actually work on some platforms, and subsequent discussion with Robert Haas. Back-patch to 8.4. In earlier releases it's not that important whether we get the hasSeek test right, but with parallel restore it matters.
* Fix pg_restore so parallel restore doesn't fail when the input file doesn'tTom Lane2010-06-27
| | | | | | | | | | contain data offsets (which it won't, if pg_dump thought its output wasn't seekable). To do that, remove an unnecessarily aggressive error check, and instead fail if we get to the end of the archive without finding the desired data item. Also improve the error message to be more specific about the cause of the problem. Per discussion of recent report from Igor Neyman. Back-patch to 8.4 where parallel restore was introduced.
* Deprecate the use of => as an operator name.Robert Haas2010-06-22
| | | | | | | | | | In HEAD, emit a warning when an operator named => is defined. In both HEAD and the backbranches (except in 8.2, where contrib modules do not have documentation), document that hstore's text => text operator may be removed in a future release, and encourage the use of the hstore(text, text) function instead. This function only exists in HEAD (previously, it was called tconvert), so backpatch it back to 8.2, when hstore was added. Per discussion.
* In a PL/pgSQL "FOR cursor" statement, the statements executed in the loopHeikki Linnakangas2010-06-21
| | | | | | | might close the cursor, rendering the Portal pointer to it invalid. Closing the cursor in the middle of the loop is not a very sensible thing to do, but we must handle it gracefully and throw an error instead of crashing.
* Fix mishandling of whole-row Vars referencing a view or sub-select.Tom Lane2010-06-21
| | | | | | | | If such a Var appeared within a nested sub-select, we failed to translate it correctly during pullup of the view, because the recursive call to replace_rte_variables_mutator was looking for the wrong sublevels_up value. Bug was introduced during the addition of the PlaceHolderVar mechanism. Per bug #5514 from Marcos Castedo.
* Fix typo, init => int, per KOIZUMI Satoru.Tom Lane2010-06-17
|
* Fix dblink_build_sql_insert() and related functions to handle droppedTom Lane2010-06-15
| | | | | | | | columns correctly. In passing, get rid of some dead logic in the underlying get_sql_insert() etc functions --- there is no caller that will pass null value-arrays to them. Per bug report from Robert Voinea.
* Consolidate and improve checking of key-column-attnum arguments forTom Lane2010-06-15
| | | | | | | | | | dblink_build_sql_insert() and related functions. In particular, be sure to reject references to dropped and out-of-range column numbers. The numbers are still interpreted as physical column numbers, though, for backward compatibility. This patch replaces Joe's patch of 2010-02-03, which handled only some aspects of the problem.
* Rearrange dblink's dblink_build_sql_insert() and related routines to open andTom Lane2010-06-14
| | | | | | | | | | | lock the target relation just once per SQL function call. The original coding obtained and released lock several times per call. Aside from saving a not-insignificant number of cycles, this eliminates possible race conditions if someone tries to modify the relation's schema concurrently. Also centralize locking and permission-checking logic. Problem noted while investigating a trouble report from Robert Voinea --- his problem is still to be fixed, though.
* Add index entry for ::, per complaint from John Gage.Alvaro Herrera2010-06-09
|
* Make the walwriter close it's handle to an old xlog segment if it's no longerMagnus Hagander2010-06-09
| | | | | | | | | the current one. Not doing this would leave the walwriter with a handle to a deleted file if there was nothing for it to do for a long period of time, preventing the file from being completely removed. Reported by Tollef Fog Heen, and thanks to Heikki for some hand-holding with the patch.
* Avoid "identifier will be truncated" warning in dblinkItagaki Takahiro2010-06-09
| | | | | when connection string is longer than NAMEDATALEN. The previous fix for long connection name broke the behavior.
* Fix connection leak in dblink when dblink_connect() or dblink_connect_u()Itagaki Takahiro2010-06-09
| | | | | | end with "duplicate connection name" errors. Backported to release 7.4.
* Add missed function dblink_connect_u(text[,text]) to uninstall scriptTeodor Sigaev2010-06-07
|
* Ensure default-only storage parameters for TOAST relationsItagaki Takahiro2010-06-07
| | | | | | | | | | | | | | | | | | to be initialized with proper values. Affected parameters are fillfactor, analyze_threshold, and analyze_scale_factor. Especially uninitialized fillfactor caused inefficient page usage because we built a StdRdOptions struct in which fillfactor is zero if any reloption is set for the toast table. In addition, we disallow toast.autovacuum_analyze_threshold and toast.autovacuum_analyze_scale_factor because we didn't actually support them; they are always ignored. Report by Rumko on pgsql-bugs on 12 May 2010. Analysis by Tom Lane and Alvaro Herrera. Patch by me. Backpatch to 8.4.
* Data returned by RETURNING clause wasn't correctly processed by ecpg. Patch ↵Michael Meskes2010-06-04
| | | | backported from HEAD.
* Fix regression test name for plperlu_plperl in msvc.Andrew Dunstan2010-06-03
|
* Fix dblink to treat connection names longer than NAMEDATALEN-2 (62 bytes).Itagaki Takahiro2010-06-03
| | | | | | | Now long names are adjusted with truncate_identifier() and NOTICE messages are raised if names are actually truncated. Backported to release 8.0.
* Run recently backported plperlu_plperl regression tests when building with ↵Andrew Dunstan2010-06-02
| | | | MSVC on releases 8.4 and 8.3. Regression tests weren't supported before that.
* Fix misuse of Lossy Counting (LC) algorithm in compute_tsvector_stats().Tom Lane2010-05-30
| | | | | | | | | | | | | | | | | | | We must filter out hashtable entries with frequencies less than those specified by the algorithm, else we risk emitting junk entries whose actual frequency is much less than other lexemes that did not get tabulated. This is bad enough by itself, but even worse is that tsquerysel() believes that the minimum frequency seen in pg_statistic is a hard upper bound for lexemes not included, and was thus underestimating the frequency of non-MCEs. Also, set the threshold frequency to something with a little bit of theory behind it, to wit assume that the input distribution is approximately Zipfian. This might need adjustment in future, but some preliminary experiments suggest that it's not too unreasonable. Back-patch to 8.4, where this code was introduced. Jan Urbanski, with some editorialization by Tom
* Rewrite LIKE's %-followed-by-_ optimization so it really works (this timeTom Lane2010-05-28
| | | | | | | | | | | for sure ;-)). It now also optimizes more cases, such as %_%_. Improve comments too. Per bug #5478. In passing, also rename the TCHAR macro to GETCHAR, because pgindent is messing with the formatting of the former (apparently it now thinks TCHAR is a typedef name). Back-patch to 8.3, where the bug was introduced.
* Rejigger mergejoin logic so that a tuple with a null in the first merge columnTom Lane2010-05-28
| | | | | | | | | | | | | | | | | | | is treated like end-of-input, if nulls sort last in that column and we are not doing outer-join filling for that input. In such a case, the tuple cannot join to anything from the other input (because we assume mergejoinable operators are strict), and neither can any tuple following it in the sort order. If we're not interested in doing outer-join filling we can just pretend the tuple and its successors aren't there at all. This can save a great deal of time in situations where there are many nulls in the join column, as in a recent example from Scott Marlowe. Also, since the planner tends to not count nulls in its mergejoin scan selectivity estimates, this is an important fix to make the runtime behavior more like the estimate. I regard this as an omission in the patch I wrote years ago to teach mergejoin that tuples containing nulls aren't joinable, so I'm back-patching it. But only to 8.3 --- in older versions, we didn't have a solid notion of whether nulls sort high or low, so attempting to apply this optimization could break things.
* Change ps_status.c to explicitly track the current logical length of ps_buffer.Tom Lane2010-05-27
| | | | | | | | | | | This saves cycles in get_ps_display() on many popular platforms, and more importantly ensures that get_ps_display() will correctly return an empty string if init_ps_display() hasn't been called yet. Per trouble report from Ray Stell, in which log_line_prefix %i produced junk early in backend startup. Back-patch to 8.0. 7.4 doesn't have %i and its version of get_ps_display() makes no pretense of avoiding pad junk anyhow.
* Make CREATE INDEX run expression preprocessing on a proposed index expressionTom Lane2010-05-27
| | | | | | | | | | | | | | | | | | | | | before it checks whether the expression is immutable. This covers two cases that were previously handled poorly: 1. SQL function inlining could reduce the apparent volatility of the expression, allowing an expression to be accepted where it previously would not have been. As an example, polymorphic functions must be marked with the worst-case volatility they have for any argument type, but for specific argument types they might not be so volatile, so indexing could be allowed. (Since the planner will refuse to inline functions in cases where the apparent volatility of the expression would increase, this won't break any cases that were accepted before.) 2. A nominally immutable function could have default arguments that are volatile expressions. In such a case insertion of the defaults will increase both the apparent and actual volatility of the expression, so it is *necessary* to check this before allowing the expression to be indexed. Back-patch to 8.4, where default arguments were introduced.
* Fix oversight in construction of sort/unique plans for UniquePaths.Tom Lane2010-05-25
| | | | | | | | | | | | | If the original IN operator is cross-type, for example int8 = int4, we need to use int4 < int4 to sort the inner data and int4 = int4 to unique-ify it. We got the first part of that right, but tried to use the original IN operator for the equality checks. Per bug #5472 from Vlad Romascanu. Backpatch to 8.4, where the bug was introduced by the patch that unified SortClause and GroupClause. I was able to take out a whole lot of on-the-fly calls of get_equality_op_for_ordering_op(), but failed to realize that I needed to put one back in right here :-(
* Change the "N. Central Asia Standard Time" timezone to map toMagnus Hagander2010-05-20
| | | | | | | | | | Asia/Novosibirsk on Windows. Microsoft changed the behaviour of this zone in the timezone update from KB976098. The zones differ in handling of DST, and the old zone was just removed. Noted by Dmitry Funk
* Refer to pg_ident.conf as config file for username mapping, as it'sMagnus Hagander2010-05-18
| | | | | | now used for other things than just ident authentication. Noted by Stephen Frost
* > Follow up a visit from the style police.Andrew Dunstan2010-05-17
|
* Fix longstanding typo in V1 calling conventions documentation.Robert Haas2010-05-16
| | | | Erik Rijkers
* Improve documentation of pg_restore's -l and -L switches to point out theirTom Lane2010-05-15
| | | | | interactions with filtering switches, such as -n and -t. Per a complaint from Russell Smith.
* Fix typos in comments, spotted by Josh Kupershmidt.Heikki Linnakangas2010-05-15
|
* tag 8.4.4REL8_4_4Marc G. Fournier2010-05-14
|
* Fix MSVC builds for recent plperl changes. Go back to version 8.2, which isAndrew Dunstan2010-05-13
| | | | | | where we started supporting MSVC builds. Security: CVE-2010-1169
* Update release notes with security issues.Tom Lane2010-05-13
| | | | Security: CVE-2010-1169, CVE-2010-1170
* Use an entity instead of non-ASCII letter. Thom BrownTom Lane2010-05-13
|
* Use "TOAST table" in place of the vague, not-used-elsewhere phraseTom Lane2010-05-13
| | | | "supplementary storage table".
* Prevent PL/Tcl from loading the "unknown" module from pltcl_modules unlessTom Lane2010-05-13
| | | | | | | | | | | | | | | | | | | that is a regular table or view owned by a superuser. This prevents a trojan horse attack whereby any unprivileged SQL user could create such a table and insert code into it that would then get executed in other users' sessions whenever they call pltcl functions. Worse yet, because the code was automatically loaded into both the "normal" and "safe" interpreters at first use, the attacker could execute unrestricted Tcl code in the "normal" interpreter without there being any pltclu functions anywhere, or indeed anyone else using pltcl at all: installing pltcl is sufficient to open the hole. Change the initialization logic so that the "unknown" code is only loaded into an interpreter when the interpreter is first really used. (That doesn't add any additional security in this particular context, but it seems a prudent change, and anyway the former behavior violated the principle of least astonishment.) Security: CVE-2010-1170
* Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it isAndrew Dunstan2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | fundamentally insecure. Instead apply an opmask to the whole interpreter that imposes restrictions on unsafe operations. These restrictions are much harder to subvert than is Safe.pm, since there is no container to be broken out of. Backported to release 7.4. In releases 7.4, 8.0 and 8.1 this also includes the necessary backporting of the two interpreters model for plperl and plperlu adopted in release 8.2. In versions 8.0 and up, the use of Perl's POSIX module to undo its locale mangling on Windows has become insecure with these changes, so it is replaced by our own routine, which is also faster. Nice side effects of the changes include that it is now possible to use perl's "strict" pragma in a natural way in plperl, and that perl's $a and $b variables now work as expected in sort routines, and that function compilation is significantly faster. Tim Bunce and Andrew Dunstan, with reviews from Alex Hunsaker and Alexey Klyukin. Security: CVE-2010-1169
* Fix some spelling errors.Magnus Hagander2010-05-13
| | | | Thom Brown
* Translation updatePeter Eisentraut2010-05-13
|
* Preliminary release notes for releases 8.4.4, 8.3.11, 8.2.17, 8.1.21, 8.0.25,Tom Lane2010-05-12
| | | | 7.4.29.