From cb2db7cc00816f9f2848e19e3395ac2fbd2c38e1 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <zigo@debian.org>
Date: Tue, 31 Mar 2026 10:37:52 +0200
Subject: [PATCH] Add postgresql-debversion metapackage

Depending on postgresql-<VERSION>-debversion is annoying, as it
changes on each release of PGSql. This intends to fix it, so that
dak may depend on this package.
---
 debian/control | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/debian/control b/debian/control
index 50a0ae7..ad3feb9 100644
--- a/debian/control
+++ b/debian/control
@@ -46,3 +46,34 @@ Description: Debian version number type for PostgreSQL
     including commutator and negator optimisation hints
   * Operator classes for btree and hash indexes
   * The aggregate functions min() and max()
+
+Package: postgresql-debversion
+Architecture: all
+Depends:
+ postgresql-18-debversion,
+ ${misc:Depends},
+Description: Debian version number type for PostgreSQL - metapackage
+ 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()
+ .
+ This is a metapackage that contains no version number, to be used as a
+ direct dependency instead of the versioned package name.
-- 
2.47.3

