summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2012-02-17Fix longstanding error in contrib/intarray's int[] & int[] operator.Tom Lane
The array intersection code would give wrong results if the first entry of the correct output array would be "1". (I think only this value could be at risk, since the previous word would always be a lower-bound entry with that fixed value.) Problem spotted by Julien Rouhaud, initial patch by Guillaume Lelarge, cosmetic improvements by me.
2012-02-15Have pg_upgrade output 'link' or 'copy' when reporting its status.Bruce Momjian
Idea from Peter.
2012-02-15sepgsql: Move some code from hooks.c to label.cRobert Haas
This is some preliminary refactoring related to a pending patch to allow sepgsql-enable sessions to make dynamic label transitions. But this commit doesn't involve any functional change: it just puts some bits of code in more logical places. KaiGai Kohei
2012-02-15Fix pg_test_fsync Win32 problems reported by the build farm; addBruce Momjian
comments about the alarm method used on Win32.
2012-02-15Try to get pg_test_thread to compile on Windows by using a sleeperBruce Momjian
thread.
2012-02-14Preserve column names in the execution-time tupledesc for a RowExpr.Tom Lane
The hstore and json datatypes both have record-conversion functions that pay attention to column names in the composite values they're handed. We used to not worry about inserting correct field names into tuple descriptors generated at runtime, but given these examples it seems useful to do so. Observe the nicer-looking results in the regression tests whose results changed. catversion bump because there is a subtle change in requirements for stored rule parsetrees: RowExprs from ROW() constructs now have to include field names. Andrew Dunstan and Tom Lane
2012-02-14Change contrib/pg_test_fsync to control tests in terms of seconds perBruce Momjian
test, rather than a number of test cycles. Changes -o/cycles option to -s/seconds.
2012-02-14Improve labeling of pg_test_fsync open_sync test output.Bruce Momjian
2012-02-13Fix auto-explain JSON output to be valid JSON.Andrew Dunstan
Problem reported by Peter Eisentraut. Backpatched to release 9.0.
2012-02-07Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.Robert Haas
Sometimes it may be useful to get actual row counts out of EXPLAIN (ANALYZE) without paying the cost of timing every node entry/exit. With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that. Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
2012-02-01Implement dry-run mode for pg_archivecleanupAlvaro Herrera
In dry-run mode, just the name of the file to be removed is printed to stdout; this is so the user can easily plug it into another program through a pipe. If debug mode is also specified, a more verbose message is printed to stderr. Author: Gabriele Bartolini Reviewer: Josh Kupershmidt
2012-01-28Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().Tom Lane
Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to report certain types of invalid-input errors, and would instead return random garbage values. Marko Kreen, per report from Stefan Kaltenbrunner
2012-01-27Fix pg_upgrade --help text for --user to not use a plural cluster name.Bruce Momjian
2012-01-25Now that the shared library name can be adjusted in the library test,Bruce Momjian
have pg_upgrade allocate a maximum fixed size buffer for testing the library file name, rather than base the allocation on the library name. Backpatch to 9.1.
2012-01-25Improve plpython fix comment in pg_upgrade.Bruce Momjian
2012-01-25In pg_upgrade, when checking for the plpython library, we must check forBruce Momjian
"plpython2" when upgrading from pre-PG 9.1. Patch to head and 9.1. Per report from Peter.
2012-01-25Fix new SQL tablespace location function usage in pg_upgrade to properlyBruce Momjian
check cluster version numbers, and fix missing table alias.
2012-01-20Triggered change notifications.Robert Haas
Kevin Grittner, reviewed (in earlier versions) by Álvaro Herrera
2012-01-19Add pg_upgrade C comment about why we check all relkinds for regtypes.Bruce Momjian
2012-01-15pgcrypto: Remove inappropriate const qualifierPeter Eisentraut
The function in question does not in fact ensure that the passed argument is not changed, and the callers don't care much either.
2012-01-10Fix one-byte buffer overrun in contrib/test_parser.Tom Lane
The original coding examined the next character before verifying that there *is* a next character. In the worst case with the input buffer right up against the end of memory, this would result in a segfault. Problem spotted by Paul Guyot; this commit extends his patch to fix an additional case. In addition, make the code a tad more readable by not overloading the usage of *tlen.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-12-27Standardize treatment of strcmp() return valuePeter Eisentraut
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
2011-12-27Remove support for on_exit()Peter Eisentraut
All supported platforms support the C89 standard function atexit() (SunOS 4 probably being the last one not to), and supporting both makes the code clumsy.
2011-12-27Run "make all" as a prerequisite of "make check"Peter Eisentraut
This is the standard behavior but was forgotten in some places.
2011-12-21sepgsql: Check CREATE permissions for some object types.Robert Haas
KaiGai Kohei, reviewed by Dimitri Fontaine and me.
2011-12-09If pg_test_fsync is interrupted, clean up the temp file.Robert Haas
Marti Raudsepp, with additional paranoia by me.
2011-12-07Remove spclocation field from pg_tablespaceMagnus Hagander
Instead, add a function pg_tablespace_location(oid) used to return the same information, and do this by reading the symbolic link. Doing it this way makes it possible to relocate a tablespace when the database is down by simply changing the symbolic link.
2011-12-05In pg_upgrade, allow tables using regclass to be upgraded because weBruce Momjian
preserve pg_class oids since PG 9.0.
2011-11-30Move EXTRA_CLEAN to where it actually works.Tom Lane
2011-11-29pg_upgrade: Disable installcheckPeter Eisentraut
Disabled for now because some build farm members with low resources are not prepared to handle it.
2011-11-27Add pg_upgrade test suitePeter Eisentraut
It runs the regression tests, runs pg_upgrade on the populated database, and compares the before and after dumps. While not actually a cross-version upgrade, this does detect omissions and bugs in the involved tools from time to time. It's also possible to do a cross-version upgrade by manually supplying parameters.
2011-11-26Fix overly-aggressive and inconsistent quoting in OS X start script.Tom Lane
Sidar Lopez, per bug #6310, with some additional improvements by me. Back-patch to 9.0, where the issue was introduced.
2011-11-26Remove ENABLE_SAME_CATVERSION_UPGRADES as unnecessary.Bruce Momjian
2011-11-24Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing toBruce Momjian
allow upgrades of the same catalog version. (Doesn't work for tablespaces, as indicated by C comment.)
2011-11-21Fix citext upgrade script to update derived copies of pg_type.typcollation.Tom Lane
If the existing citext type has not merely been created, but used in any tables, then the upgrade script wasn't doing enough. We have to update attcollation for each citext table column, and indcollation for each citext index column, as well. Per report from Rudolf van der Leeden.
2011-11-18Remove scandir() requirement in pg_upgrade; instead just use readdir()Bruce Momjian
--- we were not using the scandir pattern filtering anyway. This also removes the scandir requirement in configure.
2011-11-17Don't quote language nameAlvaro Herrera
Same as previous patch, but give it actual thought this time
2011-11-17Don't quote language nameAlvaro Herrera
It's been deprecated for ages according to Tom, and it breaks now given the previous patch anyway. Per buildfarm
2011-11-17Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.Bruce Momjian
2011-11-17Fix pg_upgrade's pg_scandir_internal() to properly handle a NULLBruce Momjian
pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes crash on Windows. Backpatched to 9.1. Reported by Mark Dilger
2011-11-17Remove pg_upgrade function no longer called (dir_matching_filenames).Bruce Momjian
2011-11-08Fix hstore regression tests.Robert Haas
This was an oversight in commit b60653bc0b75b7f3b5dda0a2968a22129aafb2b2. Also, fix a typo spotted by Thom Brown.
2011-11-08Remove hstore's text => text operator.Robert Haas
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.
2011-11-07Fix assorted bugs in contrib/unaccent's configuration file parsing.Tom Lane
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.
2011-11-04Silence bogus compiler warning.Robert Haas
2011-11-04Check the return value of getcwd(), instead of assuming success.Robert Haas
Kevin Grittner
2011-11-03Fix bogus code in contrib/ tsearch dictionary examples.Tom Lane
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.
2011-11-03Adjust pg_upgrade "new database skip" code, e.g. 'postgres', to moreBruce Momjian
cleanly handle old/new database mismatches.
2011-11-01Clean up whitespace and indentation in parser and scanner filesPeter Eisentraut
These are not touched by pgindent, so clean them up a bit manually.