- 25 Aug, 2011 9 commits
-
-
Tom Lane authored
Per discussion, we should enforce the policy of "no backtracking" in these performance-sensitive scanners.
-
Tom Lane authored
Per previous experimentation, backtracking slows down lexing performance significantly (by about a third). It's usually pretty easy to avoid, just need to have rules that accept an incomplete construct and do whatever the lexer would have done otherwise. The backtracking was introduced by the patch that added quoted variable substitution. Back-patch to 9.0 where that was added.
-
Tom Lane authored
This is recommended in the flex manual, and there seems no good reason not to use it everywhere.
-
Robert Haas authored
Rather than dumping out the raw array as PostgreSQL represents it internally, we now print it out in a format similar to the one in which the user input it, which seems a lot more user friendly. Shigeru Hanada
-
Robert Haas authored
Shigeru Hanada
-
Robert Haas authored
This makes it slightly more clear that '*' is not part of the default value, in case that wasn't obvious. As requested by Dougal Sutherland.
-
Robert Haas authored
Noted by Hitoshi Harada.
-
Tom Lane authored
This is mainly to prove that the NaN fix actually works cross-platform.
-
Tom Lane authored
For an empty index, the pgstatindex() function would compute 0.0/0.0 for its avg_leaf_density and leaf_fragmentation outputs. On machines that follow the IEEE float arithmetic standard with any care, that results in a NaN. However, per report from Rushabh Lathia, Microsoft couldn't manage to get this right, so you'd get a bizarre error on Windows. Fix by forcing the results to be NaN explicitly, rather than relying on the division operator to give that or the snprintf function to print it correctly. I have some doubts that this is really the most useful definition, but it seems better to remain backward-compatible with those platforms for which the behavior wasn't completely broken. Back-patch to 8.2, since the code is like that in all current releases.
-
- 24 Aug, 2011 6 commits
-
-
Alvaro Herrera authored
With these changes, the isolation tests pass again on isolation levels serializable and repeatable read. Author: Kevin Grittner
-
Tom Lane authored
The previous coding resulted in contrib modules unintentionally overriding the use of CONTRIB_TESTDB. There seems no particularly good reason to allow that (after all, the makefile can set CONTRIB_TESTDB if that's really what it intends). In passing, document REGRESS_OPTS where the other pgxs.mk options are documented. Back-patch to 9.1 --- in prior versions, there were no cases of contrib modules setting REGRESS_OPTS without including the --dbname switch, so while the coding was fragile there was no actual bug.
-
Peter Eisentraut authored
This fixes failures under parallel make when contrib modules use a generated backend header file (such as errcodes.h).
-
Tom Lane authored
We'll have to settle for just listing the extensions' data types, since function arguments seem to sort differently in different locales. Per buildfarm results.
-
Tom Lane authored
When we implemented extensions, we made findDependentObjects() treat EXTENSION dependency links similarly to INTERNAL links. However, that logic contained an implicit assumption that an object could have at most one INTERNAL dependency, so it did not work correctly for objects having both INTERNAL and DEPENDENCY links. This led to failure to drop some extension member objects when dropping the extension. Furthermore, we'd never actually exercised the case of recursing to an internally-referenced (owning) object from anything other than a NORMAL dependency, and it turns out that passing the incoming dependency's flags to the owning object is the Wrong Thing. This led to sometimes dropping a whole extension silently when we should have rejected the drop command for lack of CASCADE. Since we obviously were under-testing extension drop scenarios, add some regression test cases. Unfortunately, such test cases require some extensions (duh), so we can't test for problems in the core regression tests. I chose to add them to the earthdistance contrib module, which is a good test case because it has a dependency on the cube contrib module. Back-patch to 9.1. Arguably these are pre-existing bugs in INTERNAL dependency handling, but since it appears that the cases can never arise pre-9.1, I'll refrain from back-patching the logic changes further than that.
-
Tom Lane authored
When creating a new schema for a non-relocatable extension, we neglected to check whether the calling user has permission to create schemas. That didn't matter in the original coding, since we had already checked superuserness, but in the new dispensation where users need not be superusers, we should check it. Use CreateSchemaCommand() rather than calling NamespaceCreate() directly, so that we also enforce the rules about reserved schema names. Per complaint from KaiGai Kohei, though this isn't the same as his patch.
-
- 23 Aug, 2011 5 commits
-
-
Tom Lane authored
set_append_rel_pathlist supposed that, while computing per-column width estimates for the appendrel, it could ignore child rels for which the translated reltargetlist entry wasn't a Var. This gave rise to completely silly estimates in some common cases, such as constant outputs from some or all of the arms of a UNION ALL. Instead, fall back on get_typavgwidth to estimate from the value's datatype; which might be a poor estimate but at least it's not completely wacko. That problem was exposed by an Assert in set_subquery_size_estimates, which unfortunately was still overoptimistic even with that fix, since we don't compute attr_widths estimates for appendrels that are entirely excluded by constraints. So remove the Assert; we'll just fall back on get_typavgwidth in such cases. Also, since set_subquery_size_estimates calls set_baserel_size_estimates which calls set_rel_width, there's no need for set_subquery_size_estimates to call get_typavgwidth; set_rel_width will handle it for us if we just leave the estimate set to zero. Remove the unnecessary code. Per report from Erik Rijkers and subsequent investigation.
-
Peter Eisentraut authored
Use something like "error code %lu" for reporting GetLastError() values on Windows. Previously, a mix of different wordings and formats were in use.
-
Heikki Linnakangas authored
Fujii Masao
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 22 Aug, 2011 4 commits
-
-
Robert Haas authored
-
Tom Lane authored
The previous coding would result in deleting and not re-creating the extension membership pg_depend rows, since there was no CommandCounterIncrement that would allow recordDependencyOnCurrentExtension to see that the deletion had happened. Make it work like the shell type case, ie, keep the existing entries (and then throw an error if they're for the wrong extension). Per bug #6172 from Hitoshi Harada. Investigation and fix by Dimitri Fontaine.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 21 Aug, 2011 1 commit
-
-
Tom Lane authored
Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger fired for the same update. Fix by not trying to overload the use of estate->es_trig_tuple_slot. Per report from Yoran Heling. Back-patch to 9.0, when trigger WHEN conditions were introduced.
-
- 20 Aug, 2011 2 commits
-
-
Bruce Momjian authored
than /tmp. Also cleanup C defines and add comments. Per report by Alex Soto
-
Tom Lane authored
As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can make building a large tidbitmap into an O(N^2) operation. To fix, make sure we remove more than the minimum amount of information per call, and add a fallback path to behave sanely if we're unable to fit the bitmap within the requested amount of memory. This has been wrong since the tidbitmap code was written, so back-patch to all supported branches.
-
- 19 Aug, 2011 9 commits
-
-
Bruce Momjian authored
Kris Jurka
-
Bruce Momjian authored
Report and fix by Kris Jurka
-
Bruce Momjian authored
open/close.
-
Bruce Momjian authored
-
Bruce Momjian authored
David Fetter
-
Robert Haas authored
Eliminate dependencies on "which", as we don't really need that to be installed for proper testing. Don't number the tests, as that increases the footprint of every patch that wants to add or remove tests. Make the test output more informative, so that it's a bit easier to see what went right (or wrong). Spelling and grammar improvements.
-
Robert Haas authored
contrib/xml2 can get by without libxslt; the relevant features just won't work. But if doesn't have libxml2, or if sepgsql doesn't have libselinux, the link succeeds but the module then fails to work at load time. To avoid that, link the require libraries unconditionally, so that it will be clear at link-time that there is a problem. Per discussion with Tom Lane and KaiGai Kohei.
-
Robert Haas authored
KaiGai Kohei, with some changes by me.
-
Bruce Momjian authored
have crash-safe visibility maps to clusters that expect crash-safety. Request from Robert Haas.
-
- 18 Aug, 2011 4 commits
-
-
Robert Haas authored
-
Tom Lane authored
Now that we have a test that requires nondefault settings to pass, it seems like we'd better mention that detail in the directions about how to run the tests. Also do some very minor copy-editing.
-
Heikki Linnakangas authored
order of begin, prepare, and commit of three concurrent transactions that have conflicts between them. The test runs for a quite long time, and the expected output file is huge, but this test caught some serious bugs during development, so seems worthwhile to keep. The test uses prepared transactions, so it fails if the server has max_prepared_transactions=0. Because of that, it's marked as "ignore" in the schedule file. Dan Ports
-
Heikki Linnakangas authored
cosmetic, it removes a lot of IMHO ugly whitespace from the expected output.
-