Commit 52832230 authored by Christoph Berg's avatar Christoph Berg

Add selectivity estimators to comparison operators.

parent a706092d
{
"name": "debversion",
"abstract": "A Debian version number data type",
"abstract": "Debian version number data type",
"description": "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 extension 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. The debversion type (internally derived from the 'text' type) includes a full set of operators for version comparison (< <= = <> >= >) including commutator and negator optimisation hints, operator classes for btree and hash indexes and the aggregate functions min() and max()",
"version": "1.0.8",
"version": "1.1",
"maintainer": [
"Debian buildd-tools Developers <buildd-tools-devel@lists.alioth.debian.org>",
"Roger Leigh <rleigh@debian.org>"
"Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>",
"Christoph Berg <myon@debian.org>"
],
"license": "gpl_3",
"provides": {
"debversion": {
"abstract": "A Debian version number data type",
"file": "debversion/debversion--1.0.8.sql"
"abstract": "Debian version number data type",
"file": "debversion/debversion--1.1.sql",
"docfile": "README",
"version": "1.0.8"
"version": "1.1"
}
},
"prereqs": {
......@@ -21,11 +21,6 @@
"requires": {
"PostgreSQL": "9.1.0"
}
},
"test": {
"requires": {
"plpgsql": 0
}
}
},
"resources": {
......@@ -33,12 +28,11 @@
"web": "http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=postgresql-debversion"
},
"repository": {
"url": "git://git.debian.org/buildd-tools/postgresql-debversion.git",
"web": "http://git.debian.org/?p=buildd-tools/postgresql-debversion.git",
"url": "https://anonscm.debian.org/git/buildd-tools/postgresql-debversion.git",
"web": "https://anonscm.debian.org/cgit/buildd-tools/postgresql-debversion.git",
"type": "git"
}
},
"generated_by": "Unreleased",
"meta-spec": {
"version": "1.0.0",
"url": "http://pgxn.org/meta/spec.txt"
......
......@@ -5,7 +5,8 @@ DATA = \
debversion--1.0.5--1.0.6.sql \
debversion--1.0.6--1.0.7.sql \
debversion--1.0.7--1.0.8.sql \
debversion--1.0.8.sql
debversion--1.0.8--1.1.sql \
debversion--1.1.sql
REGRESS = debversion
PG_CONFIG = pg_config
......
postgresql-debversion (1.0.8-4) UNRELEASED; urgency=medium
postgresql-debversion (1.1-1) UNRELEASED; urgency=medium
* Switch to plain pgxs buildsystem.
* Add selectivity estimators to comparison operators.
-- Christoph Berg <myon@debian.org> Wed, 15 Nov 2017 20:51:40 +0100
......
--- Debian version type and operators -*- sql -*-
---
--- Copyright © 2008 Roger Leigh <rleigh@debian.org>
--- Copyright © 2017 Christoph Berg <myon@debian.org>
---
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
......@@ -129,7 +130,9 @@ CREATE OPERATOR = (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = =,
NEGATOR = !=
NEGATOR = !=,
RESTRICT = eqsel,
JOIN = eqjoinsel
);
COMMENT ON OPERATOR = (debversion, debversion)
IS 'debversion equal';
......@@ -139,7 +142,9 @@ CREATE OPERATOR != (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = !=,
NEGATOR = =
NEGATOR = =,
RESTRICT = neqsel,
JOIN = neqjoinsel
);
COMMENT ON OPERATOR != (debversion, debversion)
IS 'debversion not equal';
......@@ -149,7 +154,9 @@ CREATE OPERATOR < (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = >,
NEGATOR = >=
NEGATOR = >=,
RESTRICT = scalarltsel,
JOIN = scalarltjoinsel
);
COMMENT ON OPERATOR < (debversion, debversion)
IS 'debversion less-than';
......@@ -159,7 +166,9 @@ CREATE OPERATOR > (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = <,
NEGATOR = >=
NEGATOR = >=,
RESTRICT = scalargtsel,
JOIN = scalargtjoinsel
);
COMMENT ON OPERATOR > (debversion, debversion)
IS 'debversion greater-than';
......@@ -169,7 +178,9 @@ CREATE OPERATOR <= (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = >=,
NEGATOR = >
NEGATOR = >,
RESTRICT = scalarltsel,
JOIN = scalarltjoinsel
);
COMMENT ON OPERATOR <= (debversion, debversion)
IS 'debversion less-than-or-equal';
......@@ -179,7 +190,9 @@ CREATE OPERATOR >= (
LEFTARG = debversion,
RIGHTARG = debversion,
COMMUTATOR = <=,
NEGATOR = <
NEGATOR = <,
RESTRICT = scalargtsel,
JOIN = scalargtjoinsel
);
COMMENT ON OPERATOR >= (debversion, debversion)
IS 'debversion greater-than-or-equal';
......
comment = 'A Debian version number data type'
default_version = '1.0.8'
comment = 'Debian version number data type'
default_version = '1.1'
module_pathname = '$libdir/debversion'
relocatable = true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment