diff --git a/plugins/factoids.pm b/plugins/factoids.pm index 540e7db..6661969 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -658,7 +658,7 @@ factoid_lookup_order (depth, namespace, server, alias_namespace, alias_server, p SELECT 0, '', '', NULL, NULL, NULL, NULL, false, '', '' WHERE NOT EXISTS (table factoid_lookup_order_inner) ), get_latest_factoid (depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, deleted, server, namespace) AS ( - SELECT DISTINCT ON(lo.depth) lo.depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, f.deleted, f.server, f.namespace + SELECT lo.depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, f.deleted, f.server, f.namespace FROM factoid f INNER JOIN factoid_lookup_order lo ON f.generated_server = lo.gen_server @@ -691,7 +691,7 @@ factoid_lookup_order (depth, namespace, server, alias_namespace, alias_server, p SELECT 0, '', '', NULL, NULL, NULL, NULL, false, '', '' WHERE NOT EXISTS (table factoid_lookup_order_inner) ), get_latest_factoid (depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, deleted, server, namespace) AS ( - SELECT DISTINCT ON(lo.depth) lo.depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, f.deleted, f.server, f.namespace + SELECT lo.depth, factoid_id, subject, copula, predicate, author, modified_time, compose_macro, protected, original_subject, f.deleted, f.server, f.namespace FROM factoid f INNER JOIN factoid_lookup_order lo ON f.generated_server = lo.gen_server