1 create view package_age as
4 P.package, P.version,P.release,P.status,
7 order by P.version collate vercmp desc, P.release desc
11 left join preserve_packages KEEP
12 on KEEP.package = P.package and KEEP.version = P.version and KEEP.release = P.release
13 where P.status in ('updated','removed')
14 and KEEP.package is null
18 select P.package, P.version, P.release, P.status, 0 as age
19 from packages P where P.status = 'installed'
21 select P.package, P.version, P.release, 'preserved' as status, 0 as age
22 from preserve_packages P
23 order by package, version collate vercmp desc, release desc