Skip to content

Commit

Permalink
Fix returning error in postgres code
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmartinelli committed Feb 28, 2016
1 parent 60d98cd commit e353ba7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ func createJSONTable(db *sql.DB, schema string, tableName string, column string)
tableSchema := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (%s JSON)", fullyQualifiedTable, column)

statement, err := db.Prepare(tableSchema)
if err == nil {
return statement, err
}

return statement, nil
return statement, err
}

//create table with TEXT columns
Expand All @@ -122,9 +118,5 @@ func createTable(db *sql.DB, schema string, tableName string, columns []string)
tableSchema := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (%s)", fullyQualifiedTable, columnDefinitions)

statement, err := db.Prepare(tableSchema)
if err == nil {
return statement, err
}

return statement, nil
return statement, err
}

0 comments on commit e353ba7

Please sign in to comment.