From: Greg Sabino Mullane Date: Thu, 27 Aug 2009 16:07:37 +0000 (-0400) Subject: Handle newlines in constraint definitions. X-Git-Tag: c9ed279d3bf192e41b4d5c7d65f115fa49ae2519~10 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=6bf49852f41406bc4a0ede1b0b5b903153ff1ff5;p=check_postgres.git Handle newlines in constraint definitions. --- diff --git a/check_postgres.pl b/check_postgres.pl index bb4f41aef..4a8591ea1 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -4707,7 +4707,7 @@ sub check_same_schema { current_database()::information_schema.sql_identifier AS constraint_catalog, x.cstrschema::information_schema.sql_identifier AS constraint_schema, x.cstrname::information_schema.sql_identifier AS constraint_name, - constrdef + REGEXP_REPLACE(constrdef, '\n', ' \\n ','g') FROM (( SELECT DISTINCT nr.nspname, r.relname, r.relowner, a.attname, nc.nspname, c.conname, pg_catalog.pg_get_constraintdef(c.oid, true) FROM pg_namespace nr, pg_class r, pg_attribute a, pg_depend d, pg_namespace nc, pg_constraint c