aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Fix #if blocks.Bruce Momjian2011-08-26
|
* Fix potential memory clobber in tsvector_concat().Tom Lane2011-08-26
| | | | | | | | | | | | | | | tsvector_concat() allocated its result workspace using the "conservative" estimate of the sum of the two input tsvectors' sizes. Unfortunately that wasn't so conservative as all that, because it supposed that the number of pad bytes required could not grow. Which it can, as per test case from Jesper Krogh, if there's a mix of lexemes with positions and lexemes without them in the input data. The fix is to assume that we might add a not-previously-present pad byte for each and every lexeme in the two inputs; which really is conservative, but it doesn't seem worthwhile to try to be more precise. This is an aboriginal bug in tsvector_concat, so back-patch to all versions containing it.
* Improve comments describing tsvector data structure.Tom Lane2011-08-26
|
* Clean up weird corner cases in lexing of psql meta-command arguments.Tom Lane2011-08-26
| | | | | | | | | | | | | | These changes allow backtick command evaluation and psql variable interpolation to happen on substrings of a single meta-command argument. Formerly, no such evaluations happened at all if the backtick or colon wasn't the first character of the argument, and we considered an argument completed as soon as we'd processed one backtick, variable reference, or quoted substring. A string like 'FOO'BAR was thus taken as two arguments not one, not exactly what one would expect. In the new coding, an argument is considered terminated only by unquoted whitespace or backslash. Also, clean up a bunch of omissions, infelicities and outright errors in the psql documentation of variables and metacommand argument syntax.
* Support non-ASCII letters in psql variable names.Tom Lane2011-08-26
| | | | | As in the backend, the implementation actually accepts any non-ASCII character, but we only document that you can use letters.
* Fix pgrminclude regex pattern.Bruce Momjian2011-08-26
|
* Unbreak MSVC build broken by my port of flex check.Andrew Dunstan2011-08-26
| | | | | flex puts lex.backup in the current working directory regardless of where the input and output are.
* In pgrminclude, add code to skip includes with a marker comment.Bruce Momjian2011-08-26
|
* In pgrminclude, make skipped include names constent and skip files withBruce Momjian2011-08-26
| | | | #if/#ifdefs.
* Port backup check on psql lexer to MSVC.Andrew Dunstan2011-08-25
|
* Add expected isolationtester output when prepared xacts are disabledAlvaro Herrera2011-08-25
| | | | | | | | This was deemed unnecessary initially but in later discussion it was agreed otherwise. Original file from Kevin Grittner, allegedly from Dan Ports. I had to clean up whitespace a bit per changes from Heikki.
* Add makefile rules to check for backtracking in backend and psql lexers.Tom Lane2011-08-25
| | | | | Per discussion, we should enforce the policy of "no backtracking" in these performance-sensitive scanners.
* Fix psql lexer to avoid use of backtracking.Tom Lane2011-08-25
| | | | | | | | | | 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.
* Add "%option warn" to all flex input files that lacked it.Tom Lane2011-08-25
| | | | | This is recommended in the flex manual, and there seems no good reason not to use it everywhere.
* Change format of SQL/MED generic options in psql backslash commands.Robert Haas2011-08-25
| | | | | | | | 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
* Properly quote SQL/MED generic options in pg_dump output.Robert Haas2011-08-25
| | | | Shigeru Hanada
* Tweak postgresql.conf.sample's comments on listen_addresess.Robert Haas2011-08-25
| | | | | | | 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.
* Update FK alternative test output to new whitespace rulesAlvaro Herrera2011-08-24
| | | | | | | With these changes, the isolation tests pass again on isolation levels serializable and repeatable read. Author: Kevin Grittner
* Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS.Tom Lane2011-08-24
| | | | | | | | | | | | | | 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.
* Fix multiple bugs in extension dropping.Tom Lane2011-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make CREATE EXTENSION check schema creation permissions.Tom Lane2011-08-23
| | | | | | | | | | | | 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.
* Fix overoptimistic assumptions in column width estimation for subqueries.Tom Lane2011-08-23
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Use consistent format for reporting GetLastError()Peter Eisentraut2011-08-23
| | | | | | Use something like "error code %lu" for reporting GetLastError() values on Windows. Previously, a mix of different wordings and formats were in use.
* Add missing include so include file compiles cleanly on its own.Bruce Momjian2011-08-22
|
* Mark cpluspluscheck as excutable in git.Bruce Momjian2011-08-22
|
* Typo fix.Robert Haas2011-08-22
|
* Fix handling of extension membership when filling in a shell operator.Tom Lane2011-08-22
| | | | | | | | | | | | 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.
* Properly call strerror() in thread test; add comments.Bruce Momjian2011-08-22
|
* Simplify errno generating in thread testing program.Bruce Momjian2011-08-21
|
* Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist.Tom Lane2011-08-21
| | | | | | | | | 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.
* Have thread_test create its test files in the current directory, ratherBruce Momjian2011-08-20
| | | | | | than /tmp. Also cleanup C defines and add comments. Per report by Alex Soto
* Fix performance problem when building a lossy tidbitmap.Tom Lane2011-08-20
| | | | | | | | | | | 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.
* Fix copyright.pl to properly us 'tie' function.Bruce Momjian2011-08-19
| | | | Kris Jurka
* Fix problem with regex in copyright test.Bruce Momjian2011-08-19
| | | | Report and fix by Kris Jurka
* Remove use of 'tie' in perl for copyright.pl; instead use normal fileBruce Momjian2011-08-19
| | | | open/close.
* Add executable bit to file.Bruce Momjian2011-08-19
|
* Implement src/tools/copyright as a Perl program, so anyone can run it.Bruce Momjian2011-08-19
| | | | David Fetter
* Explain max_prepared_transactions requirement in isolation tests' README.Tom Lane2011-08-18
| | | | | | | | 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.
* Add an SSI regression test that tests all interesting permutations in theHeikki Linnakangas2011-08-18
| | | | | | | | | | | | | 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
* Strip whitespace from SQL blocks in the isolation test suite. This is purelyHeikki Linnakangas2011-08-18
| | | | cosmetic, it removes a lot of IMHO ugly whitespace from the expected output.
* Make lazy_vacuum_rel call pg_rusage_init only if needed.Robert Haas2011-08-18
| | | | | | do_analyze_rel already does it this way. Euler Taveira de Oliveira
* Remove obsolete README file.Robert Haas2011-08-18
| | | | | | Perhaps we ought to add some other kind of documentation here instead, but for now let's get rid of this woefully obsolete description of the sinval machinery.
* Change PyInit_plpy to external linkagePeter Eisentraut2011-08-18
| | | | | | | Module initialization functions in Python 3 must have external linkage, because PyMODINIT_FUNC does dllexport on Windows-like platforms. Without this change, the build with Python 3 fails on Windows.
* Hide unused variable warnings under Python 3Peter Eisentraut2011-08-18
|
* Fix two issues in plpython's handling of composite results.Tom Lane2011-08-17
| | | | | | | | Dropped columns within a composite type were not handled correctly. Also, we did not check for whether a composite result type had changed since we cached the information about it. Jan UrbaƄski, per a bug report from Jean-Baptiste Quenot
* Properly handle empty arrays returned from plperl functions.Andrew Dunstan2011-08-17
| | | | Bug reported by David Wheeler, fix by Alex Hunsaker.
* Translation updatesPeter Eisentraut2011-08-17
|
* Teach pg_controldata and pg_resetxlog about the new backupEndRequired fieldHeikki Linnakangas2011-08-17
| | | | in control file.
* Fix comment about which version had BACKUP METHOD line in backup_lable, again.Heikki Linnakangas2011-08-17
| | | | It was invalidated again by Fujii's patch to 9.1.
* Move \r out of translatable stringsPeter Eisentraut2011-08-17
| | | | | The translation tools are very unhappy about seeing \r in translatable strings, so move it to a separate fprintf call.