- Nov 08, 2011
-
-
Robert Haas authored
This was an oversight in commit b60653bc. Also, fix a typo spotted by Thom Brown.
-
Robert Haas authored
Since PostgreSQL 9.0, we've emitted a warning message when an operator named => is created, because the SQL standard now reserves that token for another use. But we've also shipped such an operator with hstore. Use of the function hstore(text, text) has been recommended in preference to =>(text, text). Per discussion, it's now time to take the next step and stop shipping the operator. This will allow us to prohibit the use of => as an operator name in a future release if and when we wish to support the SQL standard use of this token. The release notes should mention this incompatibility. Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
-
- Nov 07, 2011
-
-
Tom Lane authored
Make it use t_isspace() to identify whitespace, rather than relying on sscanf which is known to get it wrong on some platform/locale combinations. Get rid of fixed-size buffers. Make it actually continue to parse the file after ignoring a line with untranslatable characters, as was obviously intended. The first of these issues is per gripe from J Smith, though not exactly either of his proposed patches.
-
- Nov 04, 2011
-
-
Robert Haas authored
-
Robert Haas authored
Kevin Grittner
-
Tom Lane authored
Both dict_int and dict_xsyn were blithely assuming that whatever memory palloc gives back will be pre-zeroed. This would typically work for just about long enough to run their regression tests, and no longer :-(. The pre-9.0 code in dict_xsyn was even lamer than that, as it would happily give back a pointer to the result of palloc(0), encouraging its caller to access off the end of memory. Again, this would just barely fail to fail as long as memory contained nothing but zeroes. Per a report from Rodrigo Hjort that code based on these examples didn't work reliably.
-
- Nov 03, 2011
-
-
Bruce Momjian authored
cleanly handle old/new database mismatches.
-
- Nov 01, 2011
-
-
Peter Eisentraut authored
These are not touched by pgindent, so clean them up a bit manually.
-
Bruce Momjian authored
-
Bruce Momjian authored
'postgres' database.
-
- Oct 29, 2011
-
-
Bruce Momjian authored
new cluster. vacuumdb, used by pg_upgrade, still has this dependency.
-
- Oct 28, 2011
-
-
Bruce Momjian authored
in the old cluster.
-
Bruce Momjian authored
-
- Oct 12, 2011
-
-
Tom Lane authored
We have seen one too many reports of people trying to use 9.1 extension files in the old-fashioned way of sourcing them in psql. Not only does that usually not work (due to failure to substitute for MODULE_PATHNAME and/or @extschema@), but if it did work they'd get a collection of loose objects not an extension. To prevent this, insert an \echo ... \quit line that prints a suitable error message into each extension script file, and teach commands/extension.c to ignore lines starting with \echo. That should not only prevent any adverse consequences of loading a script file the wrong way, but make it crystal clear to users that they need to do it differently now. Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1 ... there is not going to be much value in this if we wait till 9.2.
-
- Oct 10, 2011
-
-
Bruce Momjian authored
document its use for config-only directory installs.
-
- Oct 07, 2011
-
-
Bruce Momjian authored
directory, for config-only directory installs. Only works for PG 9.2+ servers.
-
Bruce Momjian authored
failures.
-
- Oct 06, 2011
-
-
Robert Haas authored
A similar problem for pgstattuple() was fixed in April of 2010 by commit 33065ef8, but pgstatindex() seems to have been overlooked. Back-patch all the way, as with that commit, though not to 7.4 through 8.1, since those are now EOL.
-
- Oct 05, 2011
-
-
Tom Lane authored
Arrange for any problems with pre-existing settings to be reported as WARNING not ERROR, so that we don't undesirably abort the loading of the incoming add-on module. The bad setting is just discarded, as though it had never been applied at all. (This requires a change in the API of set_config_option. After some thought I decided the most potentially useful addition was to allow callers to just pass in a desired elevel.) Arrange to restore the complete stacked state of the variable, rather than cheesily reinstalling only the active value. This ensures that custom GUCs will behave unsurprisingly even when the module loading operation occurs within nested subtransactions that have changed the active value. Since a module load could occur as a result of, eg, a PL function call, this is not an unlikely scenario.
-
- Oct 01, 2011
-
-
Bruce Momjian authored
-
Tom Lane authored
Since gtrgm_penalty() is usually called many times in a row with the same "newval" (to determine which item on an index page newval fits into best), the makesign() calculation is repetitious. It's expensive enough to make it worth caching the result, so do so. On my machine this is good for more than a 40% savings in the time needed to build a trigram index on /usr/share/dict/words. This is all per a suggestion of Heikki's. In passing, make some mostly-cosmetic improvements in the caching logic in the other functions in this file that rely on caching info in fn_extra.
-
- Sep 29, 2011
-
-
Bruce Momjian authored
oid on 8.4, modify the toast name comparison test to only apply to old 9.0+ servers. (The test was previously 8.4+.) Backpatch to 9.1.X.
-
- Sep 28, 2011
-
-
Tom Lane authored
Because these tests require root privileges, not to mention invasive changes to the security configuration of the host system, it's not reasonable for them to be invoked by a regular "make check" or "make installcheck". Instead, dike out the Makefile's knowledge of the tests, and change chkselinuxenv (now renamed "test_sepgsql") into a script that verifies the environment is workable and then runs the tests. It's expected that test_sepgsql will only be run manually. While at it, do some cleanup in the error checking in the script, and do some wordsmithing in the documentation.
-
- Sep 27, 2011
-
-
Robert Haas authored
Robert Haas and KaiGai Kohei
-
- Sep 23, 2011
-
-
Robert Haas authored
This is still a bit of a hack, but it's better than the old way, for sure. KaiGai Kohei, with one change by me to make it compile
-
Robert Haas authored
-
- Sep 16, 2011
-
-
Tom Lane authored
This is implemented as a per-column boolean option, rather than trying to match COPY's convention of a single option listing the column names. Shigeru Hanada, reviewed by KaiGai Kohei
-
Tom Lane authored
Rewrite plancache.c so that a "cached plan" (which is rather a misnomer at this point) can support generation of custom, parameter-value-dependent plans, and can make an intelligent choice between using custom plans and the traditional generic-plan approach. The specific choice algorithm implemented here can probably be improved in future, but this commit is all about getting the mechanism in place, not the policy. In addition, restructure the API to greatly reduce the amount of extraneous data copying needed. The main compromise needed to make that possible was to split the initial creation of a CachedPlanSource into two steps. It's worth noting in particular that SPI_saveplan is now deprecated in favor of SPI_keepplan, which accomplishes the same end result with zero data copying, and no need to then spend even more cycles throwing away the original SPIPlan. The risk of long-term memory leaks while manipulating SPIPlans has also been greatly reduced. Most of this improvement is based on use of the recently-added MemoryContextSetParent primitive.
-
- Sep 11, 2011
-
-
Tom Lane authored
-
Peter Eisentraut authored
This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
-
- Sep 10, 2011
-
-
Peter Eisentraut authored
Add __attribute__ decorations for printf format checking to the places that were missing them. Fix the resulting warnings. Add -Wmissing-format-attribute to the standard set of warnings for GCC, so these don't happen again. The warning fixes here are relatively harmless. The one serious problem discovered by this was already committed earlier in cf15fb5c.
-
- Sep 09, 2011
-
-
Tom Lane authored
As per my recent proposal, this refactors things so that these typedefs and macros are available in a header that can be included in frontend-ish code. I also changed various headers that were undesirably including utils/timestamp.h to include datatype/timestamp.h instead. Unsurprisingly, this showed that half the system was getting utils/timestamp.h by way of xlog.h. No actual code changes here, just header refactoring.
-
- Sep 07, 2011
-
-
Bruce Momjian authored
because its internal format was changed in 8.4. Backpatch to 9.0 and 9.1. Report by depesz, diagnosis by Tom.
-
- Sep 04, 2011
-
-
Tom Lane authored
walsender.h should depend on xlog.h, not vice versa. (Actually, the inclusion was circular until a couple hours ago, which was even sillier; but Bruce broke it in the expedient rather than logically correct direction.) Because of that poor decision, plus blind application of pgrminclude, we had a situation where half the system was depending on xlog.h to include such unrelated stuff as array.h and guc.h. Clean up the header inclusion, and manually revert a lot of what pgrminclude had done so things build again. This episode reinforces my feeling that pgrminclude should not be run without adult supervision. Inclusion changes in header files in particular need to be reviewed with great care. More generally, it'd be good if we had a clearer notion of module layering to dictate which headers can sanely include which others ... but that's a big task for another day.
-
- Sep 01, 2011
-
-
Bruce Momjian authored
-
Robert Haas authored
KaiGai Kohei
-
Robert Haas authored
Don't test whether the number of labels is numerically equal to zero; count(*) isn't going return zero anyway, and the current coding blows up if it returns an empty string or an error.
-
Bruce Momjian authored
builfarm member.
-
- Aug 30, 2011
-
-
Tom Lane authored
There's no reason for this test to use the undocumented pg_prepared_xact() function, when it can use the stable API pg_prepared_xacts instead. Fixes breakage against 8.3, as reported by Justin Arnold.
-
- Aug 27, 2011
-
-
Bruce Momjian authored
include dependencies. Modify pgcompinclude to skip a common fcinfo error.
-