Revision 12477
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
1066 | 1066 |
/* need to explicitly cast each side to the return type because this does not |
1067 | 1067 |
happen automatically even when an implicit cast is available */ |
1068 | 1068 |
left_::$$||util.typeof($3)||$$, right_::$$||util.typeof($3)||$$ |
1069 |
FROM $$||$1||$$ left_ |
|
1070 |
$$||util._if($4, 'CROSS'::text, 'FULL')||$$ JOIN $$||$2||$$ right_ |
|
1071 |
$$||util._if($4, ''::text, |
|
1072 |
$$ON left_ %== right_ -- refer to EXPLAIN output for expansion of %== |
|
1073 |
$$)|| |
|
1074 |
$$WHERE left_ IS DISTINCT FROM right_ |
|
1075 |
ORDER BY left_, right_ |
|
1069 |
FROM |
|
1070 |
( |
|
1071 |
$$||util.mk_diff_query($1, $2, $4) |
|
1072 |
||$$) s |
|
1076 | 1073 |
$$, $3) |
1077 | 1074 |
; |
1078 | 1075 |
END; |
Also available in: Unified diff
schemas/util.sql: diff(text, text): use util.mk_diff_query(). this splits the complex query-generation code apart from the query-execution code.