diff --git a/constraintsRestore.go b/constraintsRestore.go index 1319f56..2ba8838 100644 --- a/constraintsRestore.go +++ b/constraintsRestore.go @@ -59,7 +59,7 @@ func fixPKey(pk constraint) { for totalViolators > 0 { // Loop till we get a 0 value (i.e 0 violation ) // How many violations are we having, if zero then loop breaks totalViolators = getTotalPKViolator(pk.table, cols) - for totalViolators > 0 { // Found violation, time to fix it + if totalViolators > 0 { // Found violation, time to fix it // If there are two or more columns forming a PK or UK // lets only fix column by column. diff --git a/mock.go b/mock.go index 81be226..1eae018 100644 --- a/mock.go +++ b/mock.go @@ -7,7 +7,7 @@ import ( var ( programName = "mock" - programVersion = "v2.3" + programVersion = "v2.4" ExecutionTimestamp = TimeNow() Path = fmt.Sprintf("%s/%s/%s", os.Getenv("HOME"), programName, ExecutionTimestamp) ) diff --git a/worker.go b/worker.go index 0440738..34138f8 100644 --- a/worker.go +++ b/worker.go @@ -66,9 +66,9 @@ func columnExtractor(tables []DBTables) []TableCollection { for _, t := range tables { var tempColumns []DBColumns if GreenplumOrPostgres == "postgres" { - columns = columnExtractorPostgres(t.Schema, t.Table) + columns = columnExtractorPostgres(fmt.Sprintf("\"%s\"", t.Schema), t.Table) } else { - columns = columnExtractorGPDB(t.Schema, t.Table); + columns = columnExtractorGPDB(fmt.Sprintf("\"%s\"", t.Schema), t.Table) } // Loops through the columns and make a collection of tables