postgresql/contrib
Bruce Momjian 54f7338fa1 This patch implements holdable cursors, following the proposal
(materialization into a tuple store) discussed on pgsql-hackers earlier.
I've updated the documentation and the regression tests.

Notes on the implementation:

- I needed to change the tuple store API slightly -- it assumes that it
won't be used to hold data across transaction boundaries, so the temp
files that it uses for on-disk storage are automatically reclaimed at
end-of-transaction. I added a flag to tuplestore_begin_heap() to control
this behavior. Is changing the tuple store API in this fashion OK?

- in order to store executor results in a tuple store, I added a new
CommandDest. This works well for the most part, with one exception: the
current DestFunction API doesn't provide enough information to allow the
Executor to store results into an arbitrary tuple store (where the
particular tuple store to use is chosen by the call site of
ExecutorRun). To workaround this, I've temporarily hacked up a solution
that works, but is not ideal: since the receiveTuple DestFunction is
passed the portal name, we can use that to lookup the Portal data
structure for the cursor and then use that to get at the tuple store the
Portal is using. This unnecessarily ties the Portal code with the
tupleReceiver code, but it works...

The proper fix for this is probably to change the DestFunction API --
Tom suggested passing the full QueryDesc to the receiveTuple function.
In that case, callers of ExecutorRun could "subclass" QueryDesc to add
any additional fields that their particular CommandDest needed to get
access to. This approach would work, but I'd like to think about it for
a little bit longer before deciding which route to go. In the mean time,
the code works fine, so I don't think a fix is urgent.

- (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and
adjusted the behavior of SCROLL in accordance with the discussion on
-hackers.

- (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml

Neil Conway
2003-03-27 16:51:29 +00:00
..
adddepend Fix script name in README. 2002-12-02 00:29:01 +00:00
array Just some fixups to a couple contrib directories I was trying out. 2003-03-20 04:39:27 +00:00
btree_gist please apply attached patch to current CVS. 2003-03-20 18:59:18 +00:00
chkpass Add missing semicolons to a few PG_FUNCTION_INFO_V1 calls. 2002-10-26 15:01:01 +00:00
cube The attached patch provides cube with 4 functions for building cubes 2003-02-13 05:26:50 +00:00
dbase This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
dblink Fix inappropriate quoting in dblink. From Joe Conway. 2002-11-23 18:59:25 +00:00
dbmirror The attatched patch fixes a memory error with contrib/dbmirror/pending.c 2003-03-20 03:58:13 +00:00
dbsize pgindent run. 2002-09-04 20:31:48 +00:00
earthdistance The attached patches change earthdistance to use the new cube functions 2003-02-13 05:31:06 +00:00
findoidjoins Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +00:00
fulltextindex This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
fuzzystrmatch This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
intagg Just some fixups to a couple contrib directories I was trying out. 2003-03-20 04:39:27 +00:00
intarray This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
ipc_check
isbn_issn Remove extraneous semicolons after routine bodies. These don't bother 2002-11-04 17:14:29 +00:00
lo Add casts between lo and oid. 2002-12-31 10:22:03 +00:00
ltree This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
mac
miscutil Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +00:00
mSQL-interface pgindent run. 2002-09-04 20:31:48 +00:00
mysql Upgrade to my2pg 1.9 2003-01-07 22:18:43 +00:00
noupdate Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +00:00
oid2name This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
oracle Upgrade to even newer ora2pg 2.0. 2003-01-07 22:17:14 +00:00
pg_autovacuum Rename README in autovacuum code to match Makefile. 2003-03-23 20:16:06 +00:00
pg_dumplo Add missing #include <getopt.h>. 2003-01-09 18:27:39 +00:00
pg_logger
pg_upgrade Make pg_resetxlog options parsing more standard and prepare messages for 2002-08-29 22:19:03 +00:00
pgbench Add note that scaling factor should be >= # of clients. 2002-11-27 19:26:10 +00:00
pgcrypto This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
pgstattuple Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +00:00
reindexdb Use sed rather than perl for reindexdb. 2002-11-03 01:20:06 +00:00
rserv Fix a dozen or so places that were passing unpredictable data strings 2002-11-22 16:25:32 +00:00
rtree_gist SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
seg Tweak bison build rules so that we get the same error messages from 2003-01-31 20:58:00 +00:00
spi This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
start-scripts I've simplified the Darwin/Mac OS X startup script I submitted earlier 2002-12-09 21:26:09 +00:00
string This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
tablefunc This patch implements holdable cursors, following the proposal 2003-03-27 16:51:29 +00:00
tips Remove the last traces of datatypes datetime and timespan. 2002-05-03 04:11:08 +00:00
tools
tsearch This patch fixes a bunch of spelling mistakes in comments throughout the 2003-03-10 22:28:22 +00:00
userlock Update /contrib for "autocommit TO 'on'". 2002-10-18 18:41:22 +00:00
vacuumlo Following patch avoids removing oids in the temporary table from the 2002-12-10 01:57:16 +00:00
xml Some time ago John Gray <jgray@azuli.co.uk> and myself worked out and 2002-12-06 03:44:14 +00:00
contrib-global.mk Make it possible to run 'make installcheck' in contrib when building 2002-11-02 00:16:21 +00:00
Makefile I have updated my pg_autovacuum program (formerly pg_avd, the name 2003-03-20 18:14:46 +00:00
README I have updated my pg_autovacuum program (formerly pg_avd, the name 2003-03-20 18:14:46 +00:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly because
they address a limited audience or are too experimental to be part of
the main source tree.  This does not preclude their usefulness.

Each subdirectory contains a README file with information about the
module.  Most items can be built with `gmake all' and installed with
`gmake install' in the usual fashion, after you have run the `configure'
script in the top-level directory.  Some directories supply new
user-defined functions, operators, or types.  After you have installed
the files you need to register the new entities in the database system
by running the commands in the supplied .sql file.  For example,

	$ psql -d dbname -f module.sql

See the PostgreSQL documentation for more information about this
procedure.


Index:
------

adddepend -
	Add object dependency information to pre-7.3 objects.
	by Rod Taylor <rbt@rbt.ca>

array -
	Array iterator functions
	by Massimo Dal Zotto <dz@cs.unitn.it>

btree_gist -
	Support for emulating BTREE indexing in GiST
	by Oleg Bartunov <oleg@sai.msu.su> and Teodor Sigaev <teodor@stack.net>

chkpass -
	An auto-encrypted password datatype
	by D'Arcy J.M. Cain <darcy@druid.net>

cube -
	Multidimensional-cube datatype (GiST indexing example)
	by Gene Selkov, Jr. <selkovjr@mcs.anl.gov>

dbase -
	Converts from dbase/xbase to PostgreSQL
	by Maarten.Boekhold <Maarten.Boekhold@reuters.com>,
	   Frank Koormann <fkoorman@usf.uni-osnabrueck.de>,
	   Ivan Baldo <lubaldo@adinet.com.uy>

dblink -
	Allows remote query execution
	by Joe Conway <mail@joeconway.com>

dbmirror -
	Replication server
	by Steven Singer <ssinger@navtechinc.com>

dbsize -
	Reports database and table disk space
	by Peter Eisentraut <peter_e@gmx.net>

earthdistance -
	Operator for computing earth distance for two points
	by Hal Snyder <hal@vailsys.com>

findoidjoins -
	Finds the joins used by oid columns by examining the actual
	values in the oid columns and row oids.
	by Bruce Momjian <pgman@candle.pha.pa.us>

fulltextindex -
	Full text indexing using triggers
	by Maarten Boekhold <maartenb@dutepp0.et.tudelft.nl>

fuzzystrmatch -
	Levenshtein, metaphone, and soundex fuzzy string matching
	by Joe Conway <mail@joeconway.com>, Joel Burton <jburton@scw.org>

intagg -
	Integer aggregator
	by mlw <markw@mohawksoft.com>

intarray -
	Index support for arrays of int4, using GiST
	by Teodor Sigaev <teodor@stack.net> and Oleg Bartunov <oleg@sai.msu.su>

ipc_check -
	Simple test script to help in configuring IPC.
	FreeBSD only, for now.

isbn_issn -
	PostgreSQL type extensions for ISBN (books) and ISSN (serials)
	by Garrett A. Wollman <wollman@khavrinen.lcs.mit.edu>

lo -
	Large Object maintenance
	by Peter Mount <peter@retep.org.uk> 

ltree -
	Tree-like data structures
	by Teodor Sigaev <teodor@stack.net> and Oleg Bartunov <oleg@sai.msu.su>

mSQL-interface -
	mSQL API translation library
	by Aldrin Leal <aldrin@americasnet.com>

mac -
	Support functions for MAC address types
	by Lawrence E. Rosenman <ler@lerctr.org>

miscutil -
	PostgreSQL assert checking and various utility functions
	by Massimo Dal Zotto <dz@cs.unitn.it>

mysql -
	Utility to convert MySQL schema dumps to SQL92 and PostgreSQL
	by Thomas Lockhart <lockhart@alumni.caltech.edu>
	   Max Rudensky <fonin@ziet.zhitomir.ua>
	   Valentine Danilchuk <valdan@ziet.zhitomir.ua>

noupdate -
	Trigger to prevent updates on single columns

oid2name - 
	Maps numeric files to table names
	by B Palmer <bpalmer@crimelabs.net>

oracle -
	Converts Oracle database schema to PostgreSQL
	by Gilles Darold <gilles@darold.net>

pg_autovacuum -
	Automatically performs vacuum
	by Matthew T. O'Connor <matthew@zeut.net>

pg_dumplo -
	Dump large objects
	by Karel Zak <zakkr@zf.jcu.cz>

pg_logger -
	Stdin-to-syslog gateway for PostgreSQL
	by Nathan Myers <ncm@nospam.cantrip.org>

pg_upgrade -
	Upgrade from previous PostgreSQL version without pg_dump/reload
	by Bruce Momjian <pgman@candle.pha.pa.us>

pgbench -
	TPC-B like benchmarking tool
	by Tatsuo Ishii <t-ishii@sra.co.jp>

pgcrypto -
	Cryptographic functions
	by Marko Kreen <marko@l-t.ee>

reindexdb - 
	Reindexes a database
	by Shaun Thomas <sthomas@townnews.com>

pgstattuple -
	A function returns the percentage of "dead" tuples in a table
	by Tatsuo Ishii <t-ishii@sra.co.jp>

rserv -
	Replication server
	by Vadim B. Mikheev <vadim4o@email.com>

rtree_gist -
	Support for emulating RTREE indexing in GiST
	by Oleg Bartunov <oleg@sai.msu.su> and Teodor Sigaev <teodor@stack.net>

seg -
	Confidence-interval datatype (GiST indexing example)
	by Gene Selkov, Jr. <selkovjr@mcs.anl.gov>

spi -
	Various trigger functions, examples for using SPI.

start-scripts - 
	Scripts for starting the server at boot time.
	
string -
	C-like input/output conversion routines for strings
	by Massimo Dal Zotto <dz@cs.unitn.it>

tablefunc -
	Examples of functions returning tables
	by Joe Conway <mail@joeconway.com>

tips/apache_logging -
	Getting Apache to log to PostgreSQL
	by Terry Mackintosh <terry@terrym.com>

tools -
	Assorted developer tools
	by Massimo Dal Zotto <dz@cs.unitn.it>

tsearch -
	Full-text-index support using GiST
	by Teodor Sigaev <teodor@stack.net> and Oleg Bartunov
	<oleg@sai.msu.su>.

userlock -
	User locks
	by Massimo Dal Zotto <dz@cs.unitn.it>

vacuumlo -
	Remove orphaned large objects
	by Peter T Mount <peter@retep.org.uk>

xml -
	Storing XML in PostgreSQL
	by John Gray <jgray@azuli.co.uk>