Project

General

Profile

« Previous | Next » 

Revision 12184

schemas/util.sql: diff_cols(): embed left_query/right_query directly in the main SQL statement, so that the query planner can take the sort order of the queries into account in planning the FULL JOIN (and where possible, use a fast merge join)

View differences:

util.sql
896 896
    LANGUAGE sql STABLE
897 897
    AS $_$
898 898
SELECT * FROM
899
util.eval2set($1, $3) left_ (left_)
899
util.eval2col_pair($$
900
SELECT * FROM
901
(
902
$$||$1||$$
903
) left_ (left_)
900 904
FULL JOIN
901
util.eval2set($2, $3) right_ (right_)
905
(
906
$$||$2||$$
907
) right_ (right_)
902 908
ON left_ = right_
903 909
WHERE left_ IS DISTINCT FROM right_
904 910
ORDER BY left_, right_
911
$$, $3)
905 912
$_$;
906 913

  
907 914

  

Also available in: Unified diff