postgresql/contrib
Bruce Momjian 87688ddf87 The large one adds support for RSA keys and reorganizes
the pubkey functions a bit.  The actual RSA-specific code
there is tiny, most of the patch consists of reorg of the
pubkey code, as lots of it was written as elgamal-only.

---------------------------------------------------------------------------

The SHLIB section was copy-pasted from somewhere and contains
several unnecessary libs.  This cleans it up a bit.

 -lcrypt
   we don't use system crypt()

 -lssl, -lssleay32
   no SSL here

 -lz in win32 section
   already added on previous line

 -ldes
   The chance anybody has it is pretty low.
   And the chance pgcrypto works with it is even lower.

Also trim the win32 section.

---------------------------------------------------------------------------

It is already disabled in Makefile, remove code too.

---------------------------------------------------------------------------

I was bit hasty making the random exponent 'k' a prime.  Further researh
shows that Elgamal encryption has no specific needs in respect to k,
any random number is fine.

It is bit different for signing, there it needs to be 'relatively prime'
to p - 1,  that means GCD(k, p-1) == 1, which is also a lot lighter than
full primality.  As we don't do signing, this can be ignored.

This brings major speedup to Elgamal encryption.

---------------------------------------------------------------------------

o  pgp_mpi_free: Accept NULLs
o  pgp_mpi_cksum: result should be 16bit
o  Remove function name from error messages - to be similar to other
   SQL functions, and it does not match anyway the called function
o  remove couple junk lines

---------------------------------------------------------------------------

o  Support for RSA encryption
o  Big reorg to better separate generic and algorithm-specific code.
o  Regression tests for RSA.

---------------------------------------------------------------------------

o  Tom stuck a CVS id into file.  I doubt the usefulness of it,
   but if it needs to be in the file then rather at the end.
   Also tag it as comment for asciidoc.
o  Mention bytea vs. text difference
o  Couple clarifications

---------------------------------------------------------------------------

There is a choice whether to update it with pgp functions or
remove it.  I decided to remove it, updating is pointless.

I've tried to keep the core of pgcrypto relatively independent
from main PostgreSQL, to make it easy to use externally if needed,
and that is good.  Eg. that made development of PGP functions much
nicer.

But I have no plans to release it as generic library, so keeping such
doc
up-to-date is waste of time.  If anyone is interested in using it in
other products, he can probably bother to read the source too.

Commented source is another thing - I'll try to make another pass
over code to see if there is anything non-obvious that would need
more comments.

---------------------------------------------------------------------------

Marko Kreen
2005-08-13 02:06:21 +00:00
..
adddepend make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
btree_gist Fix storage size for btree_gist interval indexes. Fix penalty 2005-07-21 04:15:04 +00:00
chkpass Make sure contrib C functions are marked strict where needed. 2005-01-29 22:35:02 +00:00
cube Partial fixes for contrib build on AIX: include -lm where needed. 2005-07-24 23:30:10 +00:00
dbase Clean up bogus checking of date and numeric fields in DBF files, 2005-05-27 15:44:04 +00:00
dblink Cause initdb to create a third standard database "postgres", which 2005-06-21 04:02:34 +00:00
dbmirror Convert oidvector and int2vector into variable-length arrays. This 2005-03-29 00:17:27 +00:00
earthdistance Partial fixes for contrib build on AIX: include -lm where needed. 2005-07-24 23:30:10 +00:00
fulltextindex > Please find enclose a submission to fix these problems. 2004-08-20 20:13:10 +00:00
fuzzystrmatch The attached patch implements the soundex difference function which 2005-01-26 08:04:04 +00:00
intagg Treat a zero-D array as empty in int_enum(), per Andrew@supernews. 2005-04-23 17:55:50 +00:00
intarray Add parentheses to macros when args are used in computations. Without 2005-05-25 21:40:43 +00:00
isbn_issn Make sure contrib C functions are marked strict where needed. 2005-01-29 22:35:02 +00:00
lo Cleanup the contrib/lo module: there is no need anymore to implement 2005-06-23 00:06:37 +00:00
ltree Add parentheses to macros when args are used in computations. Without 2005-05-25 21:40:43 +00:00
mSQL-interface Consistently use geteuid() not getuid(); there were a few places deviating 2005-01-08 22:51:15 +00:00
mac make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
oid2name Cause initdb to create a third standard database "postgres", which 2005-06-21 04:02:34 +00:00
oracle Triggers should return TRIGGER not OPAQUE. Looks like this script got 2004-12-30 00:30:40 +00:00
pg_buffercache Change relblocknumber field of pg_buffercache view from numeric to int8 2005-05-31 00:07:47 +00:00
pg_trgm Cleanup of GiST extensions in contrib/: now that we always invoke GiST 2005-05-21 12:08:06 +00:00
pgbench Correct a thinko in pgbench that might result in incorrectly ignoring an 2005-05-24 00:26:40 +00:00
pgcrypto The large one adds support for RSA keys and reorganizes 2005-08-13 02:06:21 +00:00
pgstattuple Document get_call_result_type() and friends; mark TypeGetTupleDesc() 2005-05-30 23:09:07 +00:00
seg Adjust contrib/seg &< and &> operators so that r-tree indexing logic 2005-06-27 00:48:07 +00:00
spi Clean up the rather historically encumbered interface to now() and 2005-06-29 22:51:57 +00:00
start-scripts Adjust postmaster to recognize that a lockfile containing its parent's PID 2004-10-01 18:30:25 +00:00
tablefunc Partial fixes for contrib build on AIX: include -lm where needed. 2005-07-24 23:30:10 +00:00
tips > Please find enclose a submission to fix these problems. 2004-08-20 20:13:10 +00:00
tsearch2 Partial fixes for contrib build on AIX: include -lm where needed. 2005-07-24 23:30:10 +00:00
userlock Simplify shared-memory lock data structures as per recent discussion: 2005-06-14 22:15:33 +00:00
vacuumlo Cleanup the contrib/lo module: there is no need anymore to implement 2005-06-23 00:06:37 +00:00
xml2 Mark xml2 CREATE FUNCTIONs as IMMUTABLE, and use the "STRICT" syntax 2005-07-14 07:12:27 +00:00
Makefile Remove contrib version of pg_autovacuum --- superseded by integrated 2005-07-29 19:38:22 +00:00
README Remove contrib version of pg_autovacuum --- superseded by integrated 2005-07-29 19:38:22 +00:00
contrib-global.mk Add a --dbname option to the pg_regress script, and use pl_regression 2005-05-17 18:26:23 +00:00

README

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.  In these cases, 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>

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

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>

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

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@sigaev.ru> and Oleg Bartunov <oleg@sai.msu.su>

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@sigaev.ru> 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>

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_buffercache -
	Real time queries on the shared buffer cache
	by Mark Kirkwood <markir@paradise.net.nz>

pg_trgm -
	Functions for determining the similarity of text based on trigram
	matching.
	by Oleg Bartunov <oleg@sai.msu.su> and Teodor Sigaev <teodor@sigaev.ru>

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

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

pgstattuple -
	A function to return statistics about "dead" tuples and free
	space within a table
	by Tatsuo Ishii <t-ishii@sra.co.jp>

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.

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

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

tsearch2 -
	Full-text-index support using GiST
	by Teodor Sigaev <teodor@sigaev.ru> 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>

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