Use postgres deb version compare function
There is a DebVersion extension that allows for comparison operations between Debian package versions directly in postgres.
This has been successfully packaged for Katello.
pulp_deb could also benefit from this existing work.
Please register to edit this issue