Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.10.1.1
-
None
-
None
-
Repro attached
-
Wrong query result
Description
dblooks replaces newlines with spaces in CHECK constraints, VIEWs and TRIGGERs. That is not the right thing to do if the newline is part of a string literal or an identifier. Look for callers of dblook.removeNewlines().
For example, create a view like this:
create view v as values 'Line #1
Line #2
Line #3';
Then run dblook on the database, and you'll see the following:
– ----------------------------------------------
– DDL Statements for views
– ----------------------------------------------
SET SCHEMA "APP";
create view v as values 'Line #1 Line #2 Line #3';
Notice that the string literal has been transformed from three lines to a single line, so it's not an equivalent view.