[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PostgreSQL code for Debian version checking and sorting

Hi dak folks,

While working on a PostgreSQL schema for wanna-build as a replacement
for the dated and inflexible Perl MLDBM backend currently in use, I've
developed a new user-defined PostgreSQL datatype (debversion) which I
thought I'd let you know about in case it's any use for your purposes.

Since it's derived from the text type you use in projectb for versions,
it's a drop-in replacement.  It uses code from Dpkg::Version for
version checking and comparison in PL/Perl, with PostgreSQL operators
in PL/pgSQL.  If we used the untrusted form of PL/PerlU we could
"use Dpkg::Version" directly and avoid the need to copy the code.

The initial revision of this is available from my copy of the sbuild
repo (not yet merged into the main repo).


The main schema is here, which has some similarities to parts of the
projectb schema, but is geared towards the needs of wanna-build.



  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Reply to: