From b9370e86acafabddba31c5fe2159dda138d1e2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ulc?= Date: Sun, 16 Sep 2012 01:35:21 +0200 Subject: [PATCH] fixed all issues related to detection of end of statement --- changelog.txt | 2 + .../utils/pgdiff/loader/PgDumpLoader.java | 399 ++++++++---------- .../utils/pgdiff/schema/PgFunction.java | 3 +- .../utils/pgdiff/Resources.properties | 2 +- .../utils/pgdiff/Resources_cs.properties | 2 +- .../utils/pgdiff/add_trigger_diff.sql | 1 - 6 files changed, 186 insertions(+), 223 deletions(-) diff --git a/changelog.txt b/changelog.txt index dc62a8cc..8243e3ac 100644 --- a/changelog.txt +++ b/changelog.txt @@ -15,6 +15,8 @@ Fixes * Fixed NPE when search_path contains quoted schema (patch by Steven Elliott). * Fixed dropping of default values when --add-defaults is specified (patch by Jim Mlodgenski). +* Fixed all bugs related to incorrect parsing of end of statement, most often + resulting in StringIndexOutOfBoundException. ----------------------- 2010-10-22: Version 2.3 diff --git a/src/main/java/cz/startnet/utils/pgdiff/loader/PgDumpLoader.java b/src/main/java/cz/startnet/utils/pgdiff/loader/PgDumpLoader.java index 807c61b0..effd3d2b 100644 --- a/src/main/java/cz/startnet/utils/pgdiff/loader/PgDumpLoader.java +++ b/src/main/java/cz/startnet/utils/pgdiff/loader/PgDumpLoader.java @@ -6,9 +6,9 @@ package cz.startnet.utils.pgdiff.loader; import cz.startnet.utils.pgdiff.Resources; +import cz.startnet.utils.pgdiff.parsers.AlterSequenceParser; import cz.startnet.utils.pgdiff.parsers.AlterTableParser; import cz.startnet.utils.pgdiff.parsers.AlterViewParser; -import cz.startnet.utils.pgdiff.parsers.AlterSequenceParser; import cz.startnet.utils.pgdiff.parsers.CommentParser; import cz.startnet.utils.pgdiff.parsers.CreateFunctionParser; import cz.startnet.utils.pgdiff.parsers.CreateIndexParser; @@ -40,92 +40,101 @@ public class PgDumpLoader { //NOPMD * Pattern for testing whether it is CREATE SCHEMA statement. */ private static final Pattern PATTERN_CREATE_SCHEMA = Pattern.compile( - "^CREATE[\\s]+SCHEMA[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^CREATE[\\s]+SCHEMA[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for parsing default schema (search_path). */ - private static final Pattern PATTERN_DEFAULT_SCHEMA = - Pattern.compile( - "^SET[\\s]+search_path[\\s]*=[\\s]*\"?([^,\\s\"]+)\"?(?:,[\\s]+.*)?;$", - Pattern.CASE_INSENSITIVE); + private static final Pattern PATTERN_DEFAULT_SCHEMA = Pattern.compile( + "^SET[\\s]+search_path[\\s]*=[\\s]*\"?([^,\\s\"]+)\"?" + + "(?:,[\\s]+.*)?;$", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE TABLE statement. */ private static final Pattern PATTERN_CREATE_TABLE = Pattern.compile( - "^CREATE[\\s]+TABLE[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^CREATE[\\s]+TABLE[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE VIEW statement. */ private static final Pattern PATTERN_CREATE_VIEW = Pattern.compile( "^CREATE[\\s]+(?:OR[\\s]+REPLACE[\\s]+)?VIEW[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is ALTER TABLE statement. */ private static final Pattern PATTERN_ALTER_TABLE = Pattern.compile("^ALTER[\\s]+TABLE[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE SEQUENCE statement. */ private static final Pattern PATTERN_CREATE_SEQUENCE = Pattern.compile( - "^CREATE[\\s]+SEQUENCE[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^CREATE[\\s]+SEQUENCE[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is ALTER SEQUENCE statement. */ private static final Pattern PATTERN_ALTER_SEQUENCE = Pattern.compile("^ALTER[\\s]+SEQUENCE[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE INDEX statement. */ private static final Pattern PATTERN_CREATE_INDEX = Pattern.compile( "^CREATE[\\s]+(?:UNIQUE[\\s]+)?INDEX[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is SELECT statement. */ - private static final Pattern PATTERN_SELECT = - Pattern.compile("^SELECT[\\s]+.*$", Pattern.CASE_INSENSITIVE); + private static final Pattern PATTERN_SELECT = Pattern.compile( + "^SELECT[\\s]+.*$", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is INSERT INTO statement. */ - private static final Pattern PATTERN_INSERT_INTO = - Pattern.compile("^INSERT[\\s]+INTO[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + private static final Pattern PATTERN_INSERT_INTO = Pattern.compile( + "^INSERT[\\s]+INTO[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is UPDATE statement. */ - private static final Pattern PATTERN_UPDATE = - Pattern.compile("^UPDATE[\\s].*$", Pattern.CASE_INSENSITIVE); + private static final Pattern PATTERN_UPDATE = Pattern.compile( + "^UPDATE[\\s].*$", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is DELETE FROM statement. */ - private static final Pattern PATTERN_DELETE_FROM = - Pattern.compile("^DELETE[\\s]+FROM[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + private static final Pattern PATTERN_DELETE_FROM = Pattern.compile( + "^DELETE[\\s]+FROM[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE TRIGGER statement. */ private static final Pattern PATTERN_CREATE_TRIGGER = Pattern.compile( - "^CREATE[\\s]+TRIGGER[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^CREATE[\\s]+TRIGGER[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is CREATE FUNCTION or CREATE OR REPLACE * FUNCTION statement. */ private static final Pattern PATTERN_CREATE_FUNCTION = Pattern.compile( "^CREATE[\\s]+(?:OR[\\s]+REPLACE[\\s]+)?FUNCTION[\\s]+.*$", - Pattern.CASE_INSENSITIVE); + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is ALTER VIEW statement. */ private static final Pattern PATTERN_ALTER_VIEW = Pattern.compile( - "^ALTER[\\s]+VIEW[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^ALTER[\\s]+VIEW[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); /** * Pattern for testing whether it is COMMENT statement. */ private static final Pattern PATTERN_COMMENT = Pattern.compile( - "^COMMENT[\\s]+ON[\\s]+.*$", Pattern.CASE_INSENSITIVE); + "^COMMENT[\\s]+ON[\\s]+.*$", + Pattern.CASE_INSENSITIVE | Pattern.DOTALL); + /** + * Storage of unprocessed line part. + */ + private static String lineBuffer; /** * Creates a new instance of PgDumpLoader. @@ -136,10 +145,11 @@ private PgDumpLoader() { /** * Loads database schema from dump file. * - * @param inputStream input stream that should be read - * @param charsetName charset that should be used to read the file + * @param inputStream input stream that should be read + * @param charsetName charset that should be used to read the + * file * @param outputIgnoredStatements whether ignored statements should be - * included in the output + * included in the output * * @return database schema from dump file */ @@ -158,75 +168,53 @@ public static PgDatabase loadDatabaseSchema(final InputStream inputStream, + charsetName, ex); } - try { - String line = reader.readLine(); - - while (line != null) { - line = stripComment(line).trim(); - line = line.trim(); - - if (line.length() == 0) { - line = reader.readLine(); - - continue; - } else if (PATTERN_CREATE_SCHEMA.matcher(line).matches()) { - CreateSchemaParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_DEFAULT_SCHEMA.matcher(line).matches()) { - final Matcher matcher = - PATTERN_DEFAULT_SCHEMA.matcher(line); - matcher.matches(); - database.setDefaultSchema(matcher.group(1)); - } else if (PATTERN_CREATE_TABLE.matcher(line).matches()) { - CreateTableParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_ALTER_TABLE.matcher(line).matches()) { - AlterTableParser.parse(database, - getWholeStatement(reader, line), - outputIgnoredStatements); - } else if (PATTERN_CREATE_SEQUENCE.matcher(line).matches()) { - CreateSequenceParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_ALTER_SEQUENCE.matcher(line).matches()) { - AlterSequenceParser.parse(database, - getWholeStatement(reader, line), - outputIgnoredStatements); - } else if (PATTERN_CREATE_INDEX.matcher(line).matches()) { - CreateIndexParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_CREATE_VIEW.matcher(line).matches()) { - CreateViewParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_ALTER_VIEW.matcher(line).matches()) { - AlterViewParser.parse(database, - getWholeStatement(reader, line), - outputIgnoredStatements); - } else if (PATTERN_CREATE_TRIGGER.matcher(line).matches()) { - CreateTriggerParser.parse( - database, getWholeStatement(reader, line)); - } else if (PATTERN_CREATE_FUNCTION.matcher(line).matches()) { - CreateFunctionParser.parse( - database, getWholeFunction(reader, line)); - } else if (PATTERN_COMMENT.matcher(line).matches()) { - CommentParser.parse(database, - getWholeStatement(reader, line), - outputIgnoredStatements); - } else if (PATTERN_SELECT.matcher(line).matches() - || PATTERN_INSERT_INTO.matcher(line).matches() - || PATTERN_UPDATE.matcher(line).matches() - || PATTERN_DELETE_FROM.matcher(line).matches()) { - getWholeStatement(reader, line); - } else if (outputIgnoredStatements) { - database.addIgnoredStatement( - getWholeStatement(reader, line)); - } else { - getWholeStatement(reader, line); - } - - line = reader.readLine(); + String statement = getWholeStatement(reader); + + while (statement != null) { + if (PATTERN_CREATE_SCHEMA.matcher(statement).matches()) { + CreateSchemaParser.parse(database, statement); + } else if (PATTERN_DEFAULT_SCHEMA.matcher(statement).matches()) { + final Matcher matcher = + PATTERN_DEFAULT_SCHEMA.matcher(statement); + matcher.matches(); + database.setDefaultSchema(matcher.group(1)); + } else if (PATTERN_CREATE_TABLE.matcher(statement).matches()) { + CreateTableParser.parse(database, statement); + } else if (PATTERN_ALTER_TABLE.matcher(statement).matches()) { + AlterTableParser.parse( + database, statement, outputIgnoredStatements); + } else if (PATTERN_CREATE_SEQUENCE.matcher(statement).matches()) { + CreateSequenceParser.parse(database, statement); + } else if (PATTERN_ALTER_SEQUENCE.matcher(statement).matches()) { + AlterSequenceParser.parse( + database, statement, outputIgnoredStatements); + } else if (PATTERN_CREATE_INDEX.matcher(statement).matches()) { + CreateIndexParser.parse(database, statement); + } else if (PATTERN_CREATE_VIEW.matcher(statement).matches()) { + CreateViewParser.parse(database, statement); + } else if (PATTERN_ALTER_VIEW.matcher(statement).matches()) { + AlterViewParser.parse( + database, statement, outputIgnoredStatements); + } else if (PATTERN_CREATE_TRIGGER.matcher(statement).matches()) { + CreateTriggerParser.parse(database, statement); + } else if (PATTERN_CREATE_FUNCTION.matcher(statement).matches()) { + CreateFunctionParser.parse(database, statement); + } else if (PATTERN_COMMENT.matcher(statement).matches()) { + CommentParser.parse( + database, statement, outputIgnoredStatements); + } else if (PATTERN_SELECT.matcher(statement).matches() + || PATTERN_INSERT_INTO.matcher(statement).matches() + || PATTERN_UPDATE.matcher(statement).matches() + || PATTERN_DELETE_FROM.matcher(statement).matches()) { + // we just ignore these statements + } else if (outputIgnoredStatements) { + database.addIgnoredStatement(statement); + } else { + // these statements are ignored if outputIgnoredStatements + // is false } - } catch (final IOException ex) { - throw new FileException(Resources.getString("CannotReadFile"), ex); + + statement = getWholeStatement(reader); } return database; @@ -235,10 +223,11 @@ public static PgDatabase loadDatabaseSchema(final InputStream inputStream, /** * Loads database schema from dump file. * - * @param file name of file containing the dump - * @param charsetName charset that should be used to read the file + * @param file name of file containing the dump + * @param charsetName charset that should be used to read the + * file * @param outputIgnoredStatements whether ignored statements should be - * included in the output + * included in the output * * @return database schema from dump file */ @@ -257,162 +246,134 @@ public static PgDatabase loadDatabaseSchema(final String file, * Reads whole statement from the reader into single-line string. * * @param reader reader to be read - * @param line first line read * * @return whole statement from the reader into single-line string */ - private static String getWholeStatement(final BufferedReader reader, - final String line) { - String newLine = line.trim(); - final StringBuilder sbStatement = new StringBuilder(newLine); - - while (!newLine.trim().endsWith(";")) { - try { - newLine = stripComment(reader.readLine()).trim(); - } catch (IOException ex) { - throw new FileException( - Resources.getString("CannotReadFile"), ex); - } + private static String getWholeStatement(final BufferedReader reader) { + final StringBuilder sbStatement = new StringBuilder(1024); - if (newLine.length() > 0) { - sbStatement.append(' '); - sbStatement.append(newLine); - } + if (lineBuffer != null) { + sbStatement.append(lineBuffer); + lineBuffer = null; + stripComment(sbStatement); } - return sbStatement.toString(); - } + int pos = sbStatement.indexOf(";"); - /** - * Reads whole CREATE FUNCTION DDL from the reader into multi-line - * string. - * - * @param reader reader to be read - * @param line first line read - * - * @return whole CREATE FUNCTION DDL from the reader into multi-line string - */ - private static String getWholeFunction(final BufferedReader reader, - final String line) { - final String firstLine = line; - final StringBuilder sbStatement = new StringBuilder(1000); - String newLine = line; - String endOfFunction = null; - boolean ignoreFirstOccurence = true; - boolean searchForSemicolon = false; - boolean nextIsSeparator = false; - - while (newLine != null) { - if (endOfFunction == null) { - boolean previousWasWhitespace = true; - - for (int i = 0; i < newLine.length(); i++) { - final char chr = newLine.charAt(i); - - if (Character.isWhitespace(chr)) { - previousWasWhitespace = true; - continue; - } else if (nextIsSeparator) { - if (chr == '\'') { - endOfFunction = "'"; - } else { - endOfFunction = newLine.substring( - i, newLine.indexOf('$', i + 1) + 1); - } - - break; - } else if (previousWasWhitespace - && Character.toUpperCase(chr) == 'A' - && Character.toUpperCase(newLine.charAt(i + 1)) == 'S' - && (i + 2 == newLine.length() - || Character.isWhitespace(newLine.charAt(i + 2)))) { - i += 2; - nextIsSeparator = true; + while (true) { + if (pos == -1) { + final String newLine; + + try { + newLine = reader.readLine(); + } catch (IOException ex) { + throw new FileException( + Resources.getString("CannotReadFile"), ex); + } + + if (newLine == null) { + if (sbStatement.toString().trim().length() == 0) { + return null; } else { - previousWasWhitespace = false; + throw new RuntimeException(MessageFormat.format( + Resources.getString("EndOfStatementNotFound"), + sbStatement.toString())); } } - } - sbStatement.append(newLine); - sbStatement.append('\n'); - - if (endOfFunction != null) { - // count occurences - if (!searchForSemicolon) { - int count = ignoreFirstOccurence ? -1 : 0; - int pos = newLine.indexOf(endOfFunction); - ignoreFirstOccurence = false; + if (sbStatement.length() > 0) { + sbStatement.append('\n'); + } - while (pos != -1) { - count++; - pos = newLine.indexOf( - endOfFunction, pos + endOfFunction.length()); - } + pos = sbStatement.length(); + sbStatement.append(newLine); + stripComment(sbStatement); - if (count % 2 == 1) { - searchForSemicolon = true; + pos = sbStatement.indexOf(";", pos); + } else { + if (!isQuoted(sbStatement, pos)) { + if (pos == sbStatement.length() - 1) { + lineBuffer = null; + } else { + lineBuffer = sbStatement.substring(pos + 1); + sbStatement.setLength(pos + 1); } - } - if (searchForSemicolon && newLine.trim().endsWith(";")) { - break; + return sbStatement.toString().trim(); } - } - - try { - newLine = reader.readLine(); - } catch (final IOException ex) { - throw new FileException( - Resources.getString("CannotReadFile"), ex); - } - if (newLine == null) { - throw new RuntimeException( - Resources.getString("CannotFindEndOfFunction") + ": " - + firstLine); + pos = sbStatement.indexOf(";", pos + 1); } } - - return sbStatement.toString(); } /** * Strips comment from statement line. * - * @param statement statement - * - * @return if comment was found then statement without the comment, - * otherwise the original statement + * @param sbStatement string builder containing statement */ - private static String stripComment(final String statement) { - String result = statement; - int pos = result.indexOf("--"); + private static void stripComment(final StringBuilder sbStatement) { + int pos = sbStatement.indexOf("--"); while (pos >= 0) { if (pos == 0) { - result = ""; + sbStatement.setLength(0); - break; + return; } else { - int count = 0; + if (!isQuoted(sbStatement, pos)) { + sbStatement.setLength(pos); - for (int chr = 0; chr < pos; chr++) { - if (chr == '\'') { - count++; - } + return; + } + } + + pos = sbStatement.indexOf("--", pos + 1); + } + } + + /** + * Checks whether specified position in the string builder is quoted. It + * might be quoted either by single quote or by dollar sign quoting. + * + * @param sbString string builder + * @param pos position to be checked + * + * @return true if the specified position is quoted, otherwise false + */ + @SuppressWarnings("AssignmentToForLoopParameter") + private static boolean isQuoted(final StringBuilder sbString, + final int pos) { + boolean isQuoted = false; + + for (int curPos = 0; curPos < pos; curPos++) { + if (sbString.charAt(curPos) == '\'') { + isQuoted = !isQuoted; + + // if quote was escaped by backslash, it's like double quote + if (pos > 0 && sbString.charAt(pos - 1) == '\\') { + isQuoted = !isQuoted; + } + } else if (sbString.charAt(curPos) == '$' && !isQuoted) { + final int endPos = sbString.indexOf("$", curPos + 1); + + if (endPos == -1) { + return true; } - if ((count % 2) == 0) { - result = result.substring(0, pos).trim(); + final String tag = sbString.substring(curPos, endPos + 1); + final int endTagPos = sbString.indexOf(tag, endPos + 1); - break; + // if end tag was not found or it was found after the checked + // position, it's quoted + if (endTagPos == -1 || endTagPos > pos) { + return true; } - } - pos = result.indexOf("--", pos + 1); + curPos = endTagPos + tag.length() - 1; + } } - return result; + return isQuoted; } } diff --git a/src/main/java/cz/startnet/utils/pgdiff/schema/PgFunction.java b/src/main/java/cz/startnet/utils/pgdiff/schema/PgFunction.java index 9e68e4d0..e2ffce10 100644 --- a/src/main/java/cz/startnet/utils/pgdiff/schema/PgFunction.java +++ b/src/main/java/cz/startnet/utils/pgdiff/schema/PgFunction.java @@ -79,6 +79,7 @@ public String getCreationSQL() { sbSQL.append(") "); sbSQL.append(body); + sbSQL.append(';'); if (comment != null && !comment.isEmpty()) { sbSQL.append("\n\nCOMMENT ON FUNCTION "); @@ -194,7 +195,7 @@ public void addArgument(final Argument argument) { /** * Returns function signature. It consists of unquoted name and argument * data types. - * + * * @return function signature */ public String getSignature() { diff --git a/src/main/resources/cz/startnet/utils/pgdiff/Resources.properties b/src/main/resources/cz/startnet/utils/pgdiff/Resources.properties index 78f3d565..1aec610e 100644 --- a/src/main/resources/cz/startnet/utils/pgdiff/Resources.properties +++ b/src/main/resources/cz/startnet/utils/pgdiff/Resources.properties @@ -46,7 +46,6 @@ TypeParameterChange=TYPE change - table: {0} original: {1} new: {2} UnsupportedEncoding=Unsupported encoding CannotReadFile=Cannot read file FileNotFound=File ''{0}'' not found -CannotFindEndOfFunction=Cannot find end of function CannotFindColumnInTable=Cannot find column ''{0}'' in table ''{1}'' CannotParseStringExpectedWord=Cannot parse string: {0}\nExpected {1} at position {2} ''{3}'' CannotParseStringExpectedInteger=Cannot parse string: {0}\nExpected integer at position {1} ''{2}'' @@ -60,3 +59,4 @@ CannotFindObject=Cannot find object ''{0}'' for statement ''{1}''. CannotFindTableColumn=Cannot find column ''{0}'' in table ''{1}'' for statement ''{2}''. CannotFindTable=Cannot find table ''{0}'' for statement ''{1}''. Missing CREATE TABLE? CannotFindSequence=Cannot find sequence ''{0}'' for statement ''{1}''. Missing CREATE SEQUENCE? +EndOfStatementNotFound=Cannot find ending semicolon of statement: {0} diff --git a/src/main/resources/cz/startnet/utils/pgdiff/Resources_cs.properties b/src/main/resources/cz/startnet/utils/pgdiff/Resources_cs.properties index 8210fa49..bf8228db 100644 --- a/src/main/resources/cz/startnet/utils/pgdiff/Resources_cs.properties +++ b/src/main/resources/cz/startnet/utils/pgdiff/Resources_cs.properties @@ -46,7 +46,6 @@ TypeParameterChange=Zm\u011bna parametru TYPE - tabulka: {0} p\u016fvodn\u00ed: UnsupportedEncoding=Nepodporovan\u00e9 k\u00f3dov\u00e1n\u00ed CannotReadFile=Nelze \u010d\u00edst soubor FileNotFound=Soubor ''{0}'' nebyl nalezen -CannotFindEndOfFunction=Nelze nal\u00e9zt konec funkce CannotFindColumnInTable=Nelze nal\u00e9zt sloupec ''{0}'' v tabulce ''{1}'' CannotParseStringExpectedWord=Nelze parsovat text: {0}\nO\u010dek\u00e1v\u00e1no {1} na pozici {2} ''{3}'' CannotParseStringExpectedInteger=Nelze parsovat text: {0}\nO\u010dek\u00e1v\u00e1n integer na pozici {1} ''{2}'' @@ -60,3 +59,4 @@ CannotFindObject=Nelze nal\u00e9zt objekt ''{0}'' pro p\u0159\u00edkaz ''{1}''. CannotFindTableColumn=Nelze nal\u00e9zt sloupec ''{0}'' v tabulce ''{1}'' pro p\u0159\u00edkaz ''{2}''. CannotFindTable=Nelze nal\u00e9zt tabulku ''{0}'' pro p\u0159\u00edkaz ''{1}''. Chyb\u00ed p\u0159\u00edkaz CREATE TABLE? CannotFindSequence=Nelze nal\u00e9zt sekvenci ''{0}'' pro p\u0159\u00edkaz ''{1}''. Chyb\u00ed p\u0159\u00edkaz CREATE SEQUENCE? +EndOfStatementNotFound=Nelze nal\u00e9z ukon\u010duj\u00edc\u00ed st\u0159edn\u00edk: {0} diff --git a/src/test/resources/cz/startnet/utils/pgdiff/add_trigger_diff.sql b/src/test/resources/cz/startnet/utils/pgdiff/add_trigger_diff.sql index fcc4fa37..0d4a7879 100644 --- a/src/test/resources/cz/startnet/utils/pgdiff/add_trigger_diff.sql +++ b/src/test/resources/cz/startnet/utils/pgdiff/add_trigger_diff.sql @@ -7,7 +7,6 @@ end; $$ LANGUAGE plpgsql; - CREATE TRIGGER test_table_trigger BEFORE INSERT OR UPDATE ON test_table FOR EACH ROW