pgsql/update_tables_0.5.x-0.6.pgsql
branchv0.6.x
changeset 515 09fa019bb330
parent 514 d863a44a6353
child 518 5ec2068d02af
--- a/pgsql/update_tables_0.5.x-0.6.pgsql	Tue Apr 10 22:56:30 2012 +0200
+++ b/pgsql/update_tables_0.5.x-0.6.pgsql	Tue Apr 10 23:50:18 2012 +0200
@@ -168,7 +168,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)