summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2008-04-04Remove unneed #include now that current_query() has moved to the backend.Bruce Momjian
2008-04-04Implement current_query(), that shows the currently executing query.Bruce Momjian
At the same time remove dblink/dblink_current_query() as it is no longer necessary *BACKWARD COMPATIBILITY ISSUE* for dblink Tomas Doran
2008-04-03Add a variant of the Levenshtein string-distance function that lets the userTom Lane
specify the cost values to use, instead of always using 1's. Volkan Yazici In passing, remove fuzzystrmatch.h, which contained a bunch of stuff that had no business being in a .h file; fold it into its only user, fuzzystrmatch.c.
2008-03-26Move the HTSU_Result enum definition into snapshot.h, to avoid includingAlvaro Herrera
tqual.h into heapam.h. This makes all inclusion of tqual.h explicit. I also sorted alphabetically the includes on some source files.
2008-03-26Fix core dump in contrib/xml2's xpath_table() when the input query returnsTom Lane
a NULL value. Per bug #4058.
2008-03-25Simplify and standardize conversions between TEXT datums and ordinary CTom Lane
strings. This patch introduces four support functions cstring_to_text, cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and two macros CStringGetTextDatum and TextDatumGetCString. A number of existing macros that provided variants on these themes were removed. Most of the places that need to make such conversions now require just one function or macro call, in place of the multiple notational layers that used to be needed. There are no longer any direct calls of textout or textin, and we got most of the places that were using handmade conversions via memcpy (there may be a few still lurking, though). This commit doesn't make any serious effort to eliminate transient memory leaks caused by detoasting toasted text objects before they reach text_to_cstring. We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few places where it was easy, but much more could be done. Brendan Jurd and Tom Lane
2008-03-21Adjust pgstatindex() to give correct answers for indexes larger thanTom Lane
2^31 blocks. Also fix pg_relpages() for the same case. Tatsuhito Kasahara
2008-03-19Add -M (query mode) option per ITAGAKI TakahiroTatsuo Ishii
2008-03-19Fix tps calculation when -C supplied. Per Yoshiyuki Asaba.Tatsuo Ishii
Change Copyright owner from mine to PostgreSQL Global Development Group Fix minor message typo
2008-03-12Add a comment explaining one of the ways that pgbench fails to fullyTom Lane
comply with TPC-B. Per Itagaki Takahiro and discussion of bug#3681.
2008-03-10Fix pgbench's getrand() function so that min and max have approximatelyTom Lane
the same chance of being selected as do numbers between them. Problem noted by Greg Stark; fix by Alexey Klyukin.
2008-03-09Change patternsel() so that instead of switching from a pureTom Lane
pattern-examination heuristic method to purely histogram-driven selectivity at histogram size 100, we compute both estimates and use a weighted average. The weight put on the heuristic estimate decreases linearly with histogram size, dropping to zero for 100 or more histogram entries. Likewise in ltreeparentsel(). After a patch by Greg Stark, though I reorganized the logic a bit to give the caller of histogram_selectivity() more control.
2008-02-17Replace time_t with pg_time_t (same values, but always int64) in on-diskTom Lane
data structures and backend internal APIs. This solves problems we've seen recently with inconsistent layout of pg_control between machines that have 32-bit time_t and those that have already migrated to 64-bit time_t. Also, we can get out from under the problem that Windows' Unix-API emulation is not consistent about the width of time_t. There are a few remaining places where local time_t variables are used to hold the current or recent result of time(NULL). I didn't bother changing these since they do not affect any cross-module APIs and surely all platforms will have 64-bit time_t before overflow becomes an actual risk. time_t should be avoided for anything visible to extension modules, however.
2008-01-16Remove inappropriate cd commands, per David Wheeler. Also makeTom Lane
the PATH responsive to the installation prefix, which was the apparent intent of the previous edit, but not well executed.
2008-01-14Fix pgstat_heap() to not be broken by syncscans starting from a blockTom Lane
higher than zero. Same problem as just detected in CREATE INDEX CONCURRENTLY.
2008-01-14Use an indexscan not a heapscan to search pg_index in get_pkey_attnames.Tom Lane
Noted while looking for heapscans that might need to start from block zero.
2008-01-03The original patch to disallow non-passworded connections to non-superusersTom Lane
failed to cover all the ways in which a connection can be initiated in dblink. Plug the remaining holes. Also, disallow transient connections in functions for which that feature makes no sense (because they are only sensible as part of a sequence of operations on the same connection). Joe Conway Security: CVE-2007-6601
2008-01-01Fix some missed copyright updates.Tom Lane
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-12-31Add missing return code checks in the uuid-ossp contrib module, per bug #3841.Alvaro Herrera
2007-12-11Make documentation of -W options more accurate and uniform.Tom Lane
2007-12-11Remove the -P options of oid2name and pgbench, as they are securityTom Lane
hazards. Instead teach these programs to prompt for a password when necessary, just like all our other programs. I did not bother to invent -W switches for them, since the return on investment seems so low.
2007-12-11Make vacuumlo prompt for password when needed, thus making its -WTom Lane
switch optional, as is the case for every other one of our programs. I had already documented its -W as being optional, so this is bringing the code into line with the docs ...
2007-12-09Fix completely-bogus volatility markings on pg_trgm functions.Tom Lane
2007-12-07Clean up a couple of problems in crosstab_hash's use of a hash table.Tom Lane
The original coding leaked memory (at least 8K per crosstab_hash call) because it allowed the hash table to be allocated as a child of TopMemoryContext and then never freed it. Fix that by putting the hash table under per_query_ctx, instead. Also get rid of use of a static variable to point to the hash table. Aside from being ugly, that would actively do the wrong thing in the case of re-entrant calls to crosstab_hash, which are at least theoretically possible since it was expecting the static variable to stay valid across a SPI_execute call.
2007-12-04Correct misattribution of earthdistance module --- according to itsTom Lane
old README file, Bruno Wolff did the bulk of the work, but for some reason only Hal Snyder was credited here.
2007-12-03Remove contrib/spi/preprocessor, which has been uninteresting everTom Lane
since we supported standard FOREIGN KEY constraint syntax. It was harmless enough just sitting there, but the prospect of having to document it is surely more work than it's worth.
2007-12-03Remove obsoleted README files.Tom Lane
2007-12-02Remove README files now migrated to SGML docs.Tom Lane
2007-11-30Avoid incrementing the CommandCounter when CommandCounterIncrement is calledTom Lane
but no database changes have been made since the last CommandCounterIncrement. This should result in a significant improvement in the number of "commands" that can typically be performed within a transaction before hitting the 2^32 CommandId size limit. In particular this buys back (and more) the possible adverse consequences of my previous patch to fix plan caching behavior. The implementation requires tracking whether the current CommandCounter value has been "used" to mark any tuples. CommandCounter values stored into snapshots are presumed not to be used for this purpose. This requires some small executor changes, since the executor used to conflate the curcid of the snapshot it was using with the command ID to mark output tuples with. Separating these concepts allows some small simplifications in executor APIs. Something for the TODO list: look into having CommandCounterIncrement not do AcceptInvalidationMessages. It seems fairly bogus to be doing it there, but exactly where to do it instead isn't clear, and I'm disinclined to mess with asynchronous behavior during late beta.
2007-11-28Adjust the names of a couple of tsearch index support functions that hadTom Lane
inappropriately generic-sounding names. This is more or less free since we already forced initdb for the next beta, and it may prevent confusion or name conflicts (particularly at the C-global-symbol level) down the road. Per my proposal yesterday.
2007-11-20Adjust contrib/tsearch2 regression results to use XML tag and XML entity ↵Andrew Dunstan
descriptions, as now used by core text search default parser.
2007-11-16Run pgindent on remaining files now that LOOPBYTE is a usable macro.Bruce Momjian
2007-11-16Add snb_ru_init(internal) to list of stub functions in tsearch2Tom Lane
compatibility module. Needed to support loading of 8.1-era tsearch2 configuration data.
2007-11-16Modify LOOPBYTE/LOOPBIT macros to be more logical; rather than have theBruce Momjian
for() body passed as a parameter, make the macros act as simple headers to code blocks. This allows pgindent to be run on these files.
2007-11-15Re-run pgindent with updated list of typedefs. (Updated README shouldBruce Momjian
avoid this problem in the future.)
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-11-13Resurrect the code for the rewrite(ARRAY[...]) aggregate function,Tom Lane
and put it into contrib/tsearch2 compatibility module.
2007-11-13Ooops, missed one file to remove.Tom Lane
2007-11-13Update description of contrib/tsearch2.Tom Lane
2007-11-13Re-add contrib/tsearch2 to the set of buildable contrib modules.Tom Lane
2007-11-13Replace the now-incompatible-with-core contrib/tsearch2 module with aTom Lane
compatibility package. This supports importing dumps from past versions using tsearch2, and provides the old names and API for most functions that were changed. (rewrite(ARRAY[...]) is a glaring omission, though.) Pavel Stehule and Tom Lane
2007-11-13Fix a few contrib regression test scripts that hadn't gotten the wordTom Lane
about best practice for including the module creation scripts: to wit that you should suppress NOTICE messages. This avoids creating regression failures by adding or removing comment lines in the module scripts.
2007-11-13Adjust expected file for new CVS version label.Bruce Momjian
2007-11-13Add CVS version labels to all install/uninstall scripts.Bruce Momjian
2007-11-13Fix more script breakage.Tom Lane
2007-11-13Fix insufficient search-path paranoia in SQL function definitions.Tom Lane
Remove setting of search_path in install/uninstall scripts, since unlike other contrib modules this one does not want to let you change the installation schema.
2007-11-13Adjust script to be consistent (thanks Tom for the fix).Bruce Momjian
2007-11-13Undo damage from yesterday's script "cleanup".Tom Lane
2007-11-13I find that an out-of-the-box installation of OSSP uuid 1.6.0 installsTom Lane
itself as libuuid, not libossp-uuid which was the only case expected by our build support. Install a configure test to determine which name to use (and to check that the library is present at all).