Revision 14234
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
868 | 868 |
CREATE FUNCTION canon_sql(expr text, table_ regtype DEFAULT NULL::regtype) RETURNS text |
869 | 869 |
LANGUAGE sql STABLE |
870 | 870 |
AS $_$ |
871 |
SELECT util.trim_parens((regexp_matches(line, |
|
872 |
'^ Filter: \((.*) IS DISTINCT FROM result_type_null\)$'))[1]) |
|
871 |
-- **IMPORTANT**: need to include the enclosing () because the DB includes them |
|
872 |
SELECT (regexp_matches(line, |
|
873 |
'^ Filter: \((.*) IS DISTINCT FROM result_type_null\)$'))[1] |
|
873 | 874 |
FROM util.explain($$ |
874 | 875 |
-- declare types (use WITH to avoid `types.` prefix) |
875 | 876 |
WITH types AS |
Also available in: Unified diff
bugfix: schemas/util.sql: canon_sql(): need to include the enclosing () because the DB includes them