From 5b0eee1c4c753129b36ed77156903993f695869b Mon Sep 17 00:00:00 2001 From: Gonzalo Fernandez Yaique Date: Wed, 18 Jan 2023 12:35:53 -0300 Subject: [PATCH] Extend match expression for table names in ddl2cpp Using pg_dump, if the table is named after a special keyword (e.g. character), is dumped as public."character". This commit extends the names expression to match those cases. --- scripts/ddl2cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ddl2cpp b/scripts/ddl2cpp index a40cb147..ee087860 100755 --- a/scripts/ddl2cpp +++ b/scripts/ddl2cpp @@ -43,7 +43,7 @@ ddlString = ( pp.QuotedString("'") | pp.QuotedString('"', escQuote='""') | pp.QuotedString("`") ) ddlTerm = pp.Word(pp.alphas + "_", pp.alphanums + "_.$") -ddlName = pp.Or([ddlTerm, ddlString, pp.Combine(ddlString + "." + ddlString)]) +ddlName = pp.Or([ddlTerm, ddlString, pp.Combine(ddlString + "." + ddlString), pp.Combine(ddlTerm + ddlString)]) ddlOperator = pp.Or( map(pp.CaselessLiteral, ["+", "-", "*", "/", "<", "<=", ">", ">=", "=", "%", "DIV"]) )