Project

General

Profile

« Previous | Next » 

Revision 12420

schemas/util.sql: diff(): support custom = operator for the table type (to FULL JOIN on only some columns). this requires casting to the base type, to avoid an ambiguity with the default = operator for record.

View differences:

trunk/schemas/util.sql
1022 1022
SELECT left_::$$||pg_typeof($3)||$$, right_::$$||pg_typeof($3)||$$
1023 1023
FROM $$||$1||$$ left_
1024 1024
$$||util._if($4, 'CROSS'::text, 'FULL')||$$ JOIN $$||$2||$$ right_
1025
$$||util._if($4, ''::text, $$ON left_ = right_
1025
$$||util._if($4, ''::text,
1026
$$ON left_::$$||pg_typeof($3)||$$ = right_::$$||pg_typeof($3)||$$
1026 1027
$$)||
1027
$$WHERE left_ IS DISTINCT FROM right_
1028
$$WHERE left_::$$||pg_typeof($3)||$$ IS DISTINCT FROM right_::$$||pg_typeof($3)||$$
1028 1029
ORDER BY left_, right_
1029 1030
$$, $3)
1030 1031
$_$;

Also available in: Unified diff