- 27 Aug, 2011 9 commits
-
-
Peter Eisentraut authored
-
Tom Lane authored
There are assorted situations wherein PQconnectPoll() will abandon a connection attempt and try again with different parameters (eg, SSL versus not SSL). However, the code forgot to discard any pending data in libpq's I/O buffers when doing this. In at least one case (server returns E message during SSL negotiation), there is unread input data which bollixes the next connection attempt. I have not checked to see whether this is possible in the other cases where we close the socket and retry, but it seems like a matter of good defensive programming to add explicit buffer-flushing code to all of them. This is one of several issues exposed by Daniel Farina's report of misbehavior after a server-side fork failure. This has been wrong since forever, so back-patch to all supported branches.
-
Bruce Momjian authored
include dependencies. Modify pgcompinclude to skip a common fcinfo error.
-
Bruce Momjian authored
-
Peter Eisentraut authored
In PostgreSQL, this is included in the SELECT privilege, so show YES or NO depending on whether SELECT is granted.
-
Peter Eisentraut authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
remove from local *.h files. Per suggestion from Alvaro.
-
- 26 Aug, 2011 18 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
.h include files before .c files. Mark some includes as needed to be ignored by pgrminclude.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
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.
-
Tom Lane authored
-
Tom Lane authored
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.
-
Tom Lane authored
As in the backend, the implementation actually accepts any non-ASCII character, but we only document that you can use letters.
-
Bruce Momjian authored
-
Andrew Dunstan authored
flex puts lex.backup in the current working directory regardless of where the input and output are.
-
Bruce Momjian authored
-
Bruce Momjian authored
#if/#ifdefs.
-
Bruce Momjian authored
introduced recently when trying to filter out temp tables. Backpatch to 9.0 and 9.1.
-
- 25 Aug, 2011 11 commits
-
-
Andrew Dunstan authored
-
Alvaro Herrera authored
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.
-
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 2 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.
-