Changeset: 19064cee8c53 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19064cee8c53 Modified Files: Branch: default Log Message:
Merged from Jun2010 diffs (25 lines): diff -r 1f889ecdb5f8 -r 19064cee8c53 java/src/nl/cwi/monetdb/util/SQLExporter.java --- a/java/src/nl/cwi/monetdb/util/SQLExporter.java Wed Aug 11 10:11:52 2010 +0200 +++ b/java/src/nl/cwi/monetdb/util/SQLExporter.java Wed Aug 11 10:47:27 2010 +0200 @@ -67,10 +67,17 @@ if (!tbl.next()) throw new SQLException("Whoops no data for " + name); // This will probably only work for MonetDB - out.print("CREATE " + type + " " + - (!useSchema ? dq(schema) + "." : "") + dq(name)); - out.print(" AS "); - out.println(tbl.getString("REMARKS").replaceFirst("create view [^ ]+ as", "").trim()); + String remarks = tbl.getString("REMARKS"); + if (remarks == null) { + out.println("-- invalid " + type + " " + + (!useSchema ? dq(schema) + "." : "") + dq(name) + + ": no definition found"); + } else { + out.print("CREATE " + type + " " + + (!useSchema ? dq(schema) + "." : "") + dq(name)); + out.print(" AS "); + out.println(remarks.replaceFirst("create view [^ ]+ as", "").trim()); + } return; } _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list