Project

General

Profile

« Previous | Next » 

Revision 12439

fix: schemas/util.sql: diff(text, text): use util.typeof() instead of pg_typeof() so the outputted query is runnable in any search_path

View differences:

trunk/schemas/util.sql
1055 1055
		util.eval2col_pair($$
1056 1056
/* need to explicitly cast each side to the return type because this does not
1057 1057
happen automatically even when an implicit cast is available */
1058
SELECT left_::$$||pg_typeof($3)||$$, right_::$$||pg_typeof($3)||$$
1058
SELECT left_::$$||util.typeof($3)||$$, right_::$$||util.typeof($3)||$$
1059 1059
FROM $$||$1||$$ left_
1060 1060
$$||util._if($4, 'CROSS'::text, 'FULL')||$$ JOIN $$||$2||$$ right_
1061 1061
$$||util._if($4, ''::text,
1062
$$ON left_::$$||pg_typeof($3)||$$ %== right_::$$||pg_typeof($3)||$$
1062
$$ON left_::$$||util.typeof($3)||$$ %== right_::$$||util.typeof($3)||$$
1063 1063
$$)||
1064
$$WHERE left_::$$||pg_typeof($3)||$$ IS DISTINCT FROM right_::$$||pg_typeof($3)||$$
1064
$$WHERE left_::$$||util.typeof($3)||$$ IS DISTINCT FROM right_::$$||util.typeof($3)||$$
1065 1065
ORDER BY left_, right_
1066 1066
$$, $3)
1067 1067
	;

Also available in: Unified diff