postgresql-debversion
═════════════════════

Debian version number type for PostgreSQL


About
─────

Debian version numbers, used to version Debian binary and source
packages, have a defined format, including specifications for how
versions should be compared in order to sort them.  This package
implements a "debversion" type to represent Debian version numbers
within the PostgreSQL database.  This also includes operators for
version comparison and index operator classes for creating indexes on
the debversion type.

Version comparison uses the algorithm used by the Debian package
manager, dpkg, using the implementation from libapt-pkg.  This means
that columns in tables using the debversion type may be sorted and
compared correctly using the same logic as "dpkg --compare-versions".
It is also possible to create indexes on these columns.

postgresql-debversion implements the following features:

* The "debversion" type (internally derived from the "text" type)
* A full set of operators for version comparison (< <= = <> >= >)
  including commutator and negator optimisation hints
* Operator classes for btree and hash indexes
* The aggregate functions min() and max()

Build Dependencies
──────────────────

The libapt-pkg and PostgreSQL server development headers and libraries
are required.


Building
────────

See INSTALL for full instructions.


Using
─────

Once built and installed, you can install the debversion type into
your database by sourcing the debversion.sql script from within the
psql shell:

  \i debversion.sql

The debversion type may also be removed by sourcing the
uninstall_debversion.sql script:

  \i uninstall_debversion.sql


-- Roger Leigh <rleigh@debian.org>  Sat, 07 Mar 2009 14:26:17 +0000
