summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2011-01-10A toast relid field are no longer needed in pg_upgrade's rel arrays, soBruce Momjian
remove them. Also other renaming.
2011-01-09Update contrib/pg_trgm for new GIN extractQuery API.Tom Lane
No actual change in functionality ... just get rid of uselessly complex code to pass the number of keys via extra_data.
2011-01-09Update contrib/hstore for new GIN extractQuery API.Tom Lane
In particular, make hstore @> '' succeed for all hstores, likewise hstore ?& '{}'. Previously the results were inconsistent and could depend on whether you were using a GiST index, GIN index, or seqscan.
2011-01-09Improve comment.Tom Lane
2011-01-09Use array_contains_nulls instead of ARR_HASNULL on user-supplied arrays.Tom Lane
This applies the fix for bug #5784 to remaining places where we wish to reject nulls in user-supplied arrays. In all these places, there's no reason not to allow a null bitmap to be present, so long as none of the current elements are actually null. I did not change some other places where we are looking at system catalog entries or aggregate transition values, as the presence of a null bitmap in such an array would be suspicious.
2011-01-09Fix assorted corner-case bugs in contrib/intarray.Tom Lane
The array containment operators now behave per mathematical expectation for empty arrays (ie, an empty array is contained in anything). Both these operators and the query_int operators now work as expected in GiST and GIN index searches, rather than having corner cases where the index searches gave different answers. Also, fix unexpected failures where the operators would claim that an array contained nulls, when in fact there was no longer any null present (similar to bug #5784). The restriction to not have nulls is still there, as removing it would take a lot of added code complexity and probably slow things down significantly. Also, remove the arbitrary restriction to 1-D arrays; unlike the other restriction, this was buying us nothing performance-wise. Assorted cosmetic improvements and marginal performance improvements, too.
2011-01-08In pg_upgrade, remove functions that did sequential array scans lookingBruce Momjian
up relations, but rather order old/new relations and use the same array index value for both. This should speed up pg_upgrade for databases with many relations.
2011-01-08In pg_upgrade, clarify use of install_db_support_functions().Bruce Momjian
2011-01-08In pg_upgrade, remove unnecessary separate handling of toast tables nowBruce Momjian
that we restore by oid; they can be handled like regular tables when creating the file mapping structure.
2011-01-07Update GIN support function definitions for contrib/intarray.Tom Lane
The underlying C code still needs work, but this at least gets its current regression test passing again.
2011-01-07Document why pg_upgrade preserves pg_auth.oid (because they are storedBruce Momjian
in pg_largeobject_metadata).
2011-01-07More pg_upgrade relfilenode C comments added.Bruce Momjian
2011-01-07Simplify pg_upgrade C comment about what is preserved.Bruce Momjian
2011-01-07In pg_upgrade, track only one copy of namespace/relname in FileNameMapBruce Momjian
because the old and new values are identical.
2011-01-07Fix C indenting in pg_upgrade function.Bruce Momjian
2011-01-07Fix pg_upgrade of large object permissions by preserving pg_auth.oid,Bruce Momjian
which is stored in pg_largeobject_metadata. No backpatch to 9.0 because you can't migrate from 9.0 to 9.0 with the same catversion (because of tablespace conflict), and a pre-9.0 migration to 9.0 has not large object permissions to migrate.
2011-01-07Force pg_upgrade's to preserve pg_class.oid, not pg_class.relfilenode.Bruce Momjian
Toast tables have identical pg_class.oid and pg_class.relfilenode, but for clarity it is good to preserve the pg_class.oid. Update comments regarding what is preserved, and do some variable/function renaming for clarity.
2011-01-07Ooops, forgot to fix contrib/tsearch2's references to GIN support funcs.Tom Lane
2011-01-07Fix GIN to support null keys, empty and null items, and full index scans.Tom Lane
Per my recent proposal(s). Null key datums can now be returned by extractValue and extractQuery functions, and will be stored in the index. Also, placeholder entries are made for indexable items that are NULL or contain no keys according to extractValue. This means that the index is now always complete, having at least one entry for every indexed heap TID, and so we can get rid of the prohibition on full-index scans. A full-index scan is implemented much the same way as partial-match scans were already: we build a bitmap representing all the TIDs found in the index, and then drive the results off that. Also, introduce a concept of a "search mode" that can be requested by extractQuery when the operator requires matching to empty items (this is just as cheap as matching to a single key) or requires a full index scan (which is not so cheap, but it sure beats failing or giving wrong answers). The behavior remains backward compatible for opclasses that don't return any null keys or request a non-default search mode. Using these features, we can now make the GIN index opclass for anyarray behave in a way that matches the actual anyarray operators for &&, <@, @>, and = ... which it failed to do before in assorted corner cases. This commit fixes the core GIN code and ginarrayprocs.c, updates the documentation, and adds some simple regression test cases for the new behaviors using the array operators. The tsearch and contrib GIN opclass support functions still need to be looked over and probably fixed. Another thing I intend to fix separately is that this is pretty inefficient for cases where more than one scan condition needs a full-index search: we'll run duplicate GinScanEntrys, each one of which builds a large bitmap. There is some existing logic to merge duplicate GinScanEntrys but it needs refactoring to make it work for entries belonging to different scan keys. Note that most of gin.h has been split out into a new file gin_private.h, so that gin.h doesn't export anything that's not supposed to be used by GIN opclasses or the rest of the backend. I did quite a bit of other code beautification work as well, mostly fixing comments and choosing more appropriate names for things.
2011-01-06Improve C comments about backend variables set by pg_upgrade_supportBruce Momjian
functions.
2011-01-05Rename pg_upgrade variables, for clarity.Bruce Momjian
2011-01-05Update pg_upgrade C comments.Bruce Momjian
2011-01-05Fix for recent pg_upgrade commit to fix large objects relfilenodeBruce Momjian
handling. (metadata user ids still an open issue).
2011-01-05In pg_upgrade, adjust transfer_relfile()'s parameters to be more logical.Bruce Momjian
2011-01-05Clarify pg_upgrade's creation of the map file structure. Also cleanBruce Momjian
up pg_dump's calling of pg_upgrade_support functions.
2011-01-04In pg_upgrade, copy pg_largeobject_metadata and its index for 9.0+Bruce Momjian
servers because, like pg_largeobject, it is a system table whose contents are not dumped by pg_dump --schema-only.
2011-01-04In pg_upgrade, fix backward logging display of link operations.Bruce Momjian
2011-01-04Simplify functions and parameters used by pg_upgrade.Bruce Momjian
2011-01-01Basic foreign table support.Robert Haas
Foreign tables are a core component of SQL/MED. This commit does not provide a working SQL/MED infrastructure, because foreign tables cannot yet be queried. Support for foreign table scans will need to be added in a future patch. However, this patch creates the necessary system catalog structure, syntax support, and support for ancillary operations such as COMMENT and SECURITY LABEL. Shigeru Hanada, heavily revised by Robert Haas
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2011-01-01Furter pg_upgrade optimizations to reduce function call argument count.Bruce Momjian
2011-01-01In pg_upgrade, remove use of whichCluster, and just pass old/new clusterBruce Momjian
pointers, which simplifies the code. This was not possible in 9.0 because everything was in a single nested struct, but is possible now. Per suggestion from Tom.
2010-12-31In pg_upgrade, rename "CLUSTERNAME" to "CLUSTER_NAME".Bruce Momjian
2010-12-29Improve pg_upgrade's checks for required executables.Tom Lane
Don't insist on pg_dumpall and psql being present in the old cluster, since they are not needed. Do insist on pg_resetxlog being present (in both old and new), since we need it. Also check for pg_config, but only in the new cluster. Remove the useless attempt to call pg_config in the old cluster; we don't need to know the old value of --pkglibdir. (In the case of a stripped-down migration installation there might be nothing there to look at anyway, so any future change that might reintroduce that need would have to be considered carefully.) Per my attempts to build a minimal previous-version installation to support pg_upgrade.
2010-12-27Mark unaccent functions as STABLE, rather than defaulting to VOLATILE.Bruce Momjian
2010-12-21Use memcmp() rather than strncmp() when shorter string length is known.Robert Haas
It appears that this will be faster for all but the shortest strings; at least one some platforms, memcmp() can use word-at-a-time comparisons. Noah Misch, somewhat pared down.
2010-12-19Fix erroneous parsing of tsquery input "... & !(subexpression) | ..."Tom Lane
After parsing a parenthesized subexpression, we must pop all pending ANDs and NOTs off the stack, just like the case for a simple operand. Per bug #5793. Also fix clones of this routine in contrib/intarray and contrib/ltree, where input of types query_int and ltxtquery had the same problem. Back-patch to all supported versions.
2010-12-15Fix contrib/seg's GiST picksplit method.Tom Lane
This patch replaces Guttman's generalized split method with a simple sort-by-center-points algorithm. Since the data is only one-dimensional we don't really need the slow and none-too-stable Guttman method. This is in part a bug fix, since seg has the same size_alpha versus size_beta typo that was recently fixed in contrib/cube. It seems prudent to apply this rather aggressive fix only in HEAD, though. Back branches will just get the typo fix. Alexander Korotkov, reviewed by Yeb Havinga
2010-12-15Use "upgrade" in preference over "migrate" in pg_upgrade messages andBruce Momjian
documentation. (Many were left over from the old pg_migrator naming.)
2010-12-11Clean up some copied-and-pasted code in pg_upgrade.Tom Lane
1. Don't reimplement S_ISDIR() and S_ISREG() badly. 2. Don't reimplement access() badly. This code appears to have been copied from ancient versions of the corresponding backend routines, and not patched to incorporate subsequent fixes (see my commits of 2008-03-31 and 2010-01-14 respectively). It might be a good idea to change it to just *call* those routines, but for now I'll just transpose these fixes over.
2010-12-04Add KNNGIST support to contrib/pg_trgm.Tom Lane
Teodor Sigaev, with some revision by Tom
2010-11-28Fix typo.Robert Haas
Fujii Masao
2010-11-27New contrib module, auth_delay.Robert Haas
KaiGai Kohei, with a few changes by me.
2010-11-26Fix significant memory leak in contrib/xml2 functions.Tom Lane
Most of the functions that execute XPath queries leaked the data structures created by libxml2. This memory would not be recovered until end of session, so it mounts up pretty quickly in any serious use of the feature. Per report from Pavel Stehule, though this isn't his patch. Back-patch to all supported branches.
2010-11-25Don't raise "identifier will be truncated" messages in dblinkItagaki Takahiro
except creating new connections.
2010-11-23Remove useless whitespace at end of linesPeter Eisentraut
2010-11-20Expose quote_literal_cstr() from core.Robert Haas
This eliminates the need for inefficient implementions of this functionality in both contrib/dblink and contrib/tablefunc, so remove them. The upcoming patch implementing an in-core format() function will also require this functionality. In passing, add some regression tests.
2010-11-14Fix bug in cube picksplit algorithm.Robert Haas
Alexander Korotkov
2010-11-14Cleanup various comparisons with the constant "true".Robert Haas
Itagaki Takahiro, with slight modifications.
2010-11-12Move copydir() prototype into its own header file.Robert Haas
Having this in src/include/port.h makes no sense, now that copydir.c lives in src/backend/strorage rather than src/port. Along the way, remove an obsolete comment from contrib/pg_upgrade that makes reference to the old location.