- 21 Aug, 2012 5 commits
-
-
Tom Lane authored
If a view has circular dependencies, pg_dump splits it into a CREATE TABLE and a CREATE RULE command to break the dependency loop. However, if the view has reloptions, those options cannot be applied in the CREATE TABLE command, because views and tables have different allowed reloptions so CREATE TABLE would reject them. Instead apply the reloptions after the CREATE RULE, using ALTER VIEW SET.
-
Robert Haas authored
Move discussion of why our algorithm for taking snapshots in recovery to a more appropriate location in the function, and delete incorrect mention of taking a lock.
-
Robert Haas authored
Craig Ringer, slightly edited by me.
-
Peter Eisentraut authored
When elevel >= ERROR, we add an abort() call to the ereport() macro to give the compiler a hint that the ereport() expansion will not return, but the abort() isn't actually reached because the longjmp happens in errfinish(). Because the effect of ereport() varies with the elevel, we cannot use standard compiler attributes such as noreturn for this.
-
Peter Eisentraut authored
-
- 20 Aug, 2012 5 commits
-
-
Robert Haas authored
Jeff Janes
-
Robert Haas authored
Jeff Janes
-
Tom Lane authored
Extraction of trigrams did not process LIKE escape sequences properly, leading to possible misidentification of trigrams near escapes, resulting in incorrect index search results. Fujii Masao
-
Heikki Linnakangas authored
If a WAL record header was split across pages, but xl_tot_len was 0, we would get confused and conclude that we had already read the whole record, and proceed to CRC check it. That can lead to a crash in RecordIsValid(), which isn't careful to not read beyond end-of-record, as defined by xl_tot_len. Add an explicit sanity check for xl_tot_len <= SizeOfXlogRecord. Also, make RecordIsValid() more robust by checking in each step that it doesn't try to access memory beyond end of record, even if a length field in the record's or a backup block's header is bogus. Per report and analysis by Tom Lane.
-
Tom Lane authored
-
- 19 Aug, 2012 2 commits
- 18 Aug, 2012 2 commits
-
-
Tom Lane authored
It said "XXX: The following could be improved if we had LATERAL" ... so let's do that. No catversion bump since either version of the view works fine.
-
Tom Lane authored
Formerly, subquery pullup had no need to examine other entries in the range table, since they could not contain any references to the subquery being pulled up. That's no longer true with LATERAL, so now we need to be able to visit rangetable subexpressions to replace Vars referencing the pulled-up subquery. Also, this means that extract_lateral_references must be unsurprised at encountering lateral PlaceHolderVars, since such might be created when pulling up a subquery that's underneath an outer join with respect to the lateral reference.
-
- 17 Aug, 2012 3 commits
-
-
Tom Lane authored
Fix grammar, put back some removed information, rearrange for clarity.
-
Tom Lane authored
We had put a test for libxml2's xmlStructuredErrorContext variable in configure, but of course that doesn't work on Windows builds. The next best alternative seems to be to test the LIBXML_VERSION symbol provided by xmlversion.h. Per report from Talha Bin Rizwan, though this fixes it in a different way than his proposed patch.
-
Bruce Momjian authored
from Dmitriy Igrishin
-
- 16 Aug, 2012 18 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
In the initial cut at the "parameterized paths" feature, I'd simplified create_index_paths() to the point where it would only generate a single parameterized bitmap path per relation. Experimentation with an example supplied by Josh Berkus convinces me that that's not good enough: we really need to consider a bitmap path for each possible outer relation. Otherwise we have regressions relative to pre-9.2 versions, in which the planner picks a plain indexscan where it should have used a bitmap scan in queries involving three or more tables. Indeed, after fixing this, several queries in the regression tests show improved plans as a result of using bitmap not plain indexscans.
-
Tom Lane authored
-
Bruce Momjian authored
-
Bruce Momjian authored
the partition.
-
Bruce Momjian authored
"unimportant". Per request from Heikki
-
Bruce Momjian authored
keywords and concepts, based on suggestions by Florian Pflug.
-
Bruce Momjian authored
-
Heikki Linnakangas authored
The implementation is a quad-tree, largely copied from the quad-tree implementation for points. The lower and upper bound of ranges are the 2d coordinates, with some extra code to handle empty ranges. I left out the support for adjacent operator, -|-, from the original patch. Not because there was necessarily anything wrong with it, but it was more complicated than the other operators, and I only have limited time for reviewing. That will follow as a separate patch. Alexander Korotkov, reviewed by Jeff Davis and me.
-
Heikki Linnakangas authored
We use a hash table to track the parents of inner pages, but when inserting to a leaf page, the caller of gistbufferinginserttuples() must pass a correct block number of the leaf's parent page. Before gistProcessItup() descends to a child page, it checks if the downlink needs to be adjusted to accommodate the new tuple, and updates the downlink if necessary. However, updating the downlink might require splitting the page, which might move the downlink to a page to the right. gistProcessItup() doesn't realize that, so when it descends to the leaf page, it might pass an out-of-date parent block number as a result. Fix that by returning the block a tuple was inserted to from gistbufferinginserttuples(). This fixes the bug reported by Zdeněk Jílovec.
-
Bruce Momjian authored
-
Bruce Momjian authored
than the actual data storage directory. Per suggestion from Thom Brown
-
Bruce Momjian authored
startup. Per report from Thom Brown
-
Bruce Momjian authored
Per suggestion from Ray Stell
-
Bruce Momjian authored
NULL), and OLD is unassigned for INSERT, and NEW/OLD are unassigned (not NULL) for statement-level triggers. Per report from Pavel Stehule
-
- 15 Aug, 2012 5 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
level, per report from Tom.
-
Bruce Momjian authored
require all parameters for \c, rather than using the defaults, which might be wrong.
-
Tom Lane authored
The previous coding essentially assumed that nodes would be rescanned in the same order they were initialized in; or at least that the "leader" of a group of CTEscans would be rescanned before any others were required to execute. Unfortunately, that isn't even a little bit true. It's possible to devise queries in which the leader isn't rescanned until other CTEscans on the same CTE have run to completion, or even in which the leader never gets a rescan call at all. The fix makes the leader specially responsible only for initial creation and final destruction of the tuplestore; rescan resets are now a symmetrically shared responsibility. This means that we might reset the tuplestore multiple times when restarting a plan subtree containing multiple CTEscans; but resetting an already-empty tuplestore is cheap enough that that doesn't seem like a problem. Per report from Adam Mackler; the new regression test cases are based on his example query. Back-patch to 8.4 where CTE scans were introduced.
-
Bruce Momjian authored
not supported in the error message, rather than the docs.
-