pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql
branchv0.6.x
changeset 515 09fa019bb330
parent 514 d863a44a6353
child 518 5ec2068d02af
equal deleted inserted replaced
514:d863a44a6353 515:09fa019bb330
   188               FROM relocated
   188               FROM relocated
   189              WHERE relocated.gid = domain_data.gid) AS relocated,
   189              WHERE relocated.gid = domain_data.gid) AS relocated,
   190            (SELECT count(gid)
   190            (SELECT count(gid)
   191               FROM domain_name
   191               FROM domain_name
   192              WHERE domain_name.gid = domain_data.gid
   192              WHERE domain_name.gid = domain_data.gid
   193                AND NOT domain_name.is_primary) AS aliasdomains
   193                AND NOT domain_name.is_primary) AS aliasdomains,
       
   194            (SELECT count(gid)
       
   195               FROM catchall
       
   196              WHERE catchall.gid = domain_data.gid) AS catchall
   194       FROM domain_data
   197       FROM domain_data
   195            LEFT JOIN domain_name USING (gid)
   198            LEFT JOIN domain_name USING (gid)
   196            LEFT JOIN users USING (gid)
   199            LEFT JOIN users USING (gid)
   197      WHERE domain_name.is_primary
   200      WHERE domain_name.is_primary
   198   GROUP BY gid;
   201   GROUP BY gid;