summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2009-08-27 16:07:37 +0000
committerGreg Sabino Mullane2009-08-27 16:07:37 +0000
commit6bf49852f41406bc4a0ede1b0b5b903153ff1ff5 (patch)
tree2553129ef688ac2c81929259beb41a161dd87e10 /check_postgres.pl
parent3d5bd3b32f1c2c51ead2eb4f33ca63fe00831e6b (diff)
Handle newlines in constraint definitions.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
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