File: README.md

package info (click to toggle)
postgresql-debversion 1.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 172 kB
  • sloc: sql: 353; cpp: 159; makefile: 29; sh: 12
file content (92 lines) | stat: -rw-r--r-- 2,998 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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()`

Installation
------------

The `libapt-pkg` and PostgreSQL server development headers and
libraries are required.  See `INSTALL` for full instructions.  In
general, just do:

    ./configure
    make
    make install

or build the Debian packages using

    dpkg-buildpackage -us -uc

If using PostgreSQL 9.0, which do not have support for `CREATE
EXTENSION`, please configure with `--disable-extension` to use the old
style config directory.  Note that this release drops support for
PostgreSQL 8.4 and earlier, which have broken headers (they don't
allow inclusion in C++ code).


Using
-----

Once built and installed, you can install the debversion type into
your database by running the following from the psql shell (PostgreSQL
9.1 and later):

    CREATE EXTENSION debversion;

If you're upgrading from an earlier version without extension support,
then please run

    CREATE EXTENSION debversion FROM unpackaged;

which will add all the existing types to the `debversion` extension.
If you wish to remove it,

    DROP EXTENSION debversion;

will remove `debversion` from the database;

Copyright and License
---------------------

Copyright © 2004-2012 Roger Leigh <rleigh@debian.org>

`debversion` is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

`debversion` is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see [http://www.gnu.org/licenses/].