aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* Clean up the rather historically encumbered interface to now() andTom Lane2005-06-29
| | | | | | | | current time: provide a GetCurrentTimestamp() function that returns current time in the form of a TimestampTz, instead of separate time_t and microseconds fields. This is what all the callers really want anyway, and it eliminates low-level dependencies on AbsoluteTime, which is a deprecated datatype that will have to disappear eventually.
* Remove the << >> &< and &> operators for contrib/cube, which wereTom Lane2005-06-27
| | | | wrong, but nobody noticed because they were also useless.
* Adjust contrib/seg &< and &> operators so that r-tree indexing logicTom Lane2005-06-27
| | | | | works properly for 1-D comparisons. Fix some other errors such as bogus commutator specifications.
* Add E'' syntax so eventually normal strings can treat backslashesBruce Momjian2005-06-26
| | | | | | | | | | | | literally. Add GUC variables: "escape_string_warning" - warn about backslashes in non-E strings "escape_string_syntax" - supports E'' syntax? "standard_compliant_strings" - treats backslashes literally in '' Update code to use E'' when escapes are used.
* Extend r-tree operator classes to handle Y-direction tests equivalentTom Lane2005-06-24
| | | | | | | | | | | | | | | to the existing X-direction tests. An rtree class now includes 4 actual 2-D tests, 4 1-D X-direction tests, and 4 1-D Y-direction tests. This involved adding four new Y-direction test operators for each of box and polygon; I followed the PostGIS project's lead as to the names of these operators. NON BACKWARDS COMPATIBLE CHANGE: the poly_overleft (&<) and poly_overright (&>) operators now have semantics comparable to box_overleft and box_overright. This is necessary to make r-tree indexes work correctly on polygons. Also, I changed circle_left and circle_right to agree with box_left and box_right --- formerly they allowed the boundaries to touch. This isn't actually essential given the lack of any r-tree opclass for circles, but it seems best to sync all the definitions while we are at it.
* Fix rtree and contrib/rtree_gist search behavior for the 1-D box andTom Lane2005-06-24
| | | | | | | | | | polygon operators (<<, &<, >>, &>). Per ideas originally put forward by andrew@supernews and later rediscovered by moi. This patch just fixes the existing opclasses, and does not add any new behavior as I proposed earlier; that can be sorted out later. In principle this could be back-patched, since it changes only search behavior and not system catalog entries nor rtree index contents. I'm not currently planning to do that, though, since I think it could use more testing.
* Move findoidjoins out of contrib and into src/tools, which is a moreTom Lane2005-06-23
| | | | | logical place for it since it is of no use to users. Per recent discussions on cleaning up contrib.
* Cleanup the contrib/lo module: there is no need anymore to implementTom Lane2005-06-23
| | | | | | | | a physically separate type. Defining 'lo' as a domain over OID works just fine and is more efficient. Improve documentation and fix up the test script. (Would like to turn test script into a proper regression test, but right now its output is not constant because of numeric OIDs; plus it makes Unix-specific assumptions about files it can import.)
* Remove contrib modules that have been agreed to be obsolete.Tom Lane2005-06-22
| | | | | (There are more that will be removed once they've been copied to pgfoundry.org.)
* Cause initdb to create a third standard database "postgres", whichTom Lane2005-06-21
| | | | | | | | | | | | | | unlike template0 and template1 does not have any special status in terms of backend functionality. However, all external utilities such as createuser and createdb now connect to "postgres" instead of template1, and the documentation is changed to encourage people to use "postgres" instead of template1 as a play area. This should fix some longstanding gotchas involving unexpected propagation of database objects by createdb (when you used template1 without understanding the implications), as well as ameliorating the problem that CREATE DATABASE is unhappy if anyone else is connected to template1. Patch by Dave Page, minor editing by Tom Lane. All per recent pghackers discussions.
* Fix bogus assumption that sizeof() produces an int-sized result.Tom Lane2005-06-20
|
* Simplify uses of readdir() by creating a function ReadDir() thatTom Lane2005-06-19
| | | | | | | includes error checking and an appropriate ereport(ERROR) message. This gets rid of rather tedious and error-prone manipulation of errno, as well as a Windows-specific bug workaround, at more than a dozen call sites. After an idea in a recent patch by Heikki Linnakangas.
* Fix display of database name during autovacuum.Bruce Momjian2005-06-15
| | | | Cosimo Streppone
* Simplify shared-memory lock data structures as per recent discussion:Tom Lane2005-06-14
| | | | | | | | | | | | | | | | it is sufficient to track whether a backend holds a lock or not, and store information about transaction vs. session locks only in the inside-the-backend LocalLockTable. Since there can now be but one PROCLOCK per lock per backend, LockCountMyLocks() is no longer needed, thus eliminating some O(N^2) behavior when a backend holds many locks. Also simplify the LockAcquire/LockRelease API by passing just a 'sessionLock' boolean instead of a transaction ID. The previous API was designed with the idea that per-transaction lock holding would be important for subtransactions, but now that we have subtransactions we know that this is unwanted. While at it, add an 'isTempObject' parameter to LockAcquire to indicate whether the lock is being taken on a temp table. This is not used just yet, but will be needed shortly for two-phase commit.
* Prevent to divide by zero and range out of 0..1Teodor Sigaev2005-06-01
|
* Change relblocknumber field of pg_buffercache view from numeric to int8Tom Lane2005-05-31
| | | | for efficiency's sake. Mark Kirkwood.
* Document get_call_result_type() and friends; mark TypeGetTupleDesc()Tom Lane2005-05-30
| | | | | | and RelationNameGetTupleDesc() as deprecated; remove uses of the latter in the contrib library. Along the way, clean up crosstab() code and documentation a little.
* Improve LockAcquire API per my recent proposal. All error conditionsTom Lane2005-05-29
| | | | | | | | are now reported via elog, eliminating the need to test the result code at most call sites. Make it possible for the caller to distinguish a freshly acquired lock from one already held in the current transaction. Use that capability to avoid redundant AcceptInvalidationMessages() calls in LockRelation().
* Modify hash_search() API to prevent future occurrences of the errorTom Lane2005-05-29
| | | | | | | | | | | | | spotted by Qingqing Zhou. The HASH_ENTER action now automatically fails with elog(ERROR) on out-of-memory --- which incidentally lets us eliminate duplicate error checks in quite a bunch of places. If you really need the old return-NULL-on-out-of-memory behavior, you can ask for HASH_ENTER_NULL. But there is now an Assert in that path checking that you aren't hoping to get that behavior in a palloc-based hash table. Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions, which were not being used anywhere anymore, and were surely too ugly and unsafe to want to see revived again.
* Clean up bogus checking of date and numeric fields in DBF files,Tom Lane2005-05-27
| | | | per report from Boris van Schooten.
* Remove second argument from textToQualifiedNameList(), as it is no longerNeil Conway2005-05-27
| | | | used. From Jaime Casanova.
* Add parentheses to macros when args are used in computations. WithoutBruce Momjian2005-05-25
| | | | them, the executation behavior could be unexpected.
* Correct a thinko in pgbench that might result in incorrectly ignoring anNeil Conway2005-05-24
| | | | error condition when executing some DDL. Per report from ITAGAKI Takahiro.
* Cleanup of GiST extensions in contrib/: now that we always invoke GiSTNeil Conway2005-05-21
| | | | | methods in a short-lived memory context, there is no need for GiST methods to do their own manual (and error-prone) memory management.
* Factor out lock cleanup code that is needed in several places in lock.c.Tom Lane2005-05-19
| | | | | | | | Also, remove the rather useless return value of LockReleaseAll. Change response to detection of corruption in the shared lock tables to PANIC, since that is the only way of cleaning up fully. Originally an idea of Heikki Linnakangas, variously hacked on by Alvaro Herrera and Tom Lane.
* Extend the pg_locks system view so that it can fully display all lockTom Lane2005-05-17
| | | | types, as per recent discussion.
* Add a --dbname option to the pg_regress script, and use pl_regressionTom Lane2005-05-17
| | | | | | for testing PLs and contrib_regression for testing contrib, instead of overwriting the core system's regression database as formerly done. Andrew Dunstan
* Cleanup GiST header files. Since GiST extensions are often written asNeil Conway2005-05-17
| | | | | | | | | | | | external projects, we should be careful about what parts of the GiST API are considered implementation details, and which are part of the public API. Therefore, I've moved internal-only declarations into gist_private.h -- future backward-incompatible changes to gist.h should be made with care, to avoid needlessly breaking external GiST extensions. Also did some related header cleanup: remove some unnecessary #includes from gist.h, and remove some unused definitions: isAttByVal(), _gistdump(), and GISTNStrategies.
* Fix typo in comment.Neil Conway2005-05-16
|
* This patch makes some minor style cleanups to contrib/btree_gist: removeNeil Conway2005-05-12
| | | | | the "extern" keyword from function definitions, reorganize some PG_GETARG_XXX() usage, and similar.
* a small tweak to enable display in the log fileBruce Momjian2005-05-11
| | | | | | | of database name before table name when VACUUMing or ANALYZing a table. Cosimo Streppone
* Fix pg_autovacuum -s flag to handle values > 2000 by using sleep()Bruce Momjian2005-05-11
| | | | | | instead of pg_usleep. Backpatch to 8.0.X.
* Tag 1000000L as long for compuation.Bruce Momjian2005-05-11
|
* For some reason access/tupmacs.h has been #including utils/memutils.h,Tom Lane2005-05-06
| | | | | | | which is neither needed by nor related to that header. Remove the bogus inclusion and instead include the header in those C files that actually need it. Also fix unnecessary inclusions and bad inclusion order in tsearch2 files.
* Change tsearch2 to not use the unsafe practice of creating functionsTom Lane2005-05-03
| | | | | | | | that return INTERNAL without also having INTERNAL arguments. Since the functions in question aren't meant to be called by hand anyway, I just redeclared them to take 'internal' instead of 'text'. Also add code to ProcedureCreate() to enforce the restriction, as I should have done to start with :-(
* Fix typos in documentation.Neil Conway2005-05-03
|
* Restructure LOCKTAG as per discussions of a couple months ago.Tom Lane2005-04-29
| | | | | | | | | | | | | | Essentially, we shoehorn in a lockable-object-type field by taking a byte away from the lockmethodid, which can surely fit in one byte instead of two. This allows less artificial definitions of all the other fields of LOCKTAG; we can get rid of the special pg_xactlock pseudo-relation, and also support locks on individual tuples and general database objects (including shared objects). None of those possibilities are actually exploited just yet, however. I removed pg_xactlock from pg_class, but did not force initdb for that change. At this point, relkind 's' (SPECIAL) is unused and could be removed entirely.
* Fix btree_gist to handle timetz zone correctly per recent changes.Tom Lane2005-04-25
|
* Treat a zero-D array as empty in int_enum(), per Andrew@supernews.Tom Lane2005-04-23
|
* int_aggregate's int_enum() doesn't work correctly with arrays thatTom Lane2005-04-23
| | | | | aren't 1-D, so give an error message instead of failing. Per report from Ron Mayer.
* Add comment about permissions on pg_ts* tablesTeodor Sigaev2005-04-19
|
* The following patch should allow UPDATE_INTERVAL to be specified on theBruce Momjian2005-04-19
| | | | | | | | | | | | | | | command line. We find this useful because we frequently deal with thousands of tables in an environment where neither the databases nor the tables are updated frequently. This helps allow us to cut down on the overhead of updating the list for every other primary loop of pg_autovacuum. I chose -i as the command-line argument and documented it briefly in the README. The patch was applied to the 7.4.7 version of pg_autovacuum in contrib. Thomas F.O'Connell
* Completion of project to use fixed OIDs for all system catalogs andTom Lane2005-04-14
| | | | | | | indexes. Replace all heap_openr and index_openr calls by heap_open and index_open. Remove runtime lookups of catalog OID numbers in various places. Remove relcache's support for looking up system catalogs by name. Bulky but mostly very boring patch ...
* Put back code mistakenly removed from copy of postmaster'sTom Lane2005-04-03
| | | | | daemonize routine, namely forcing stdin/stdout/stderr to point to /dev/null. Per Karl Denninger.
* Remove pg_buffercache_pages.h -- patch from Mark Kirkwood.Neil Conway2005-04-01
|
* 1 fix various comparing functionsTeodor Sigaev2005-03-31
| | | | 2 implement gtsvector_out for use with gevel module (debug GiST indexes, http://www.sai.msu.su/~megera/postgres/gist/gevel/)
* Fix build error in pg_buffercache on Win32 (native and cygwin). FromNeil Conway2005-03-31
| | | | Mark Kirkwood.
* Document that the "-P" option to pg_autovacuum is insecure on manyNeil Conway2005-03-30
| | | | platforms, and suggest using ~/.pgpass instead.
* Convert oidvector and int2vector into variable-length arrays. ThisTom Lane2005-03-29
| | | | | | | | | | | | | change saves a great deal of space in pg_proc and its primary index, and it eliminates the former requirement that INDEX_MAX_KEYS and FUNC_MAX_ARGS have the same value. INDEX_MAX_KEYS is still embedded in the on-disk representation (because it affects index tuple header size), but FUNC_MAX_ARGS is not. I believe it would now be possible to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet. There are still a lot of vestigial references to FUNC_MAX_ARGS, which I will clean up in a separate pass. However, getting rid of it altogether would require changing the FunctionCallInfoData struct, and I'm not sure I want to buy into that.
* Have libpgport link before libpq so that PG client applications are moreBruce Momjian2005-03-25
| | | | immunte to changes in libpq's usage of pgport between major versions.