--- a/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql Tue Apr 10 22:56:30 2012 +0200
+++ b/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql Tue Apr 10 23:50:18 2012 +0200
@@ -190,7 +190,10 @@
(SELECT count(gid)
FROM domain_name
WHERE domain_name.gid = domain_data.gid
- AND NOT domain_name.is_primary) AS aliasdomains
+ AND NOT domain_name.is_primary) AS aliasdomains,
+ (SELECT count(gid)
+ FROM catchall
+ WHERE catchall.gid = domain_data.gid) AS catchall
FROM domain_data
LEFT JOIN domain_name USING (gid)
LEFT JOIN users USING (gid)