Merge pull request #270 from mattermost/mm-1763

MM-1763 update our postgresql index check to work with 9.2.4+ versions of postgresql
This commit is contained in:
Joram Wilander
2015-07-28 12:58:47 -04:00
+1 -1
View File
@@ -224,7 +224,7 @@ func (ss SqlStore) CreateFullTextIndexIfNotExists(indexName string, tableName st
func (ss SqlStore) createIndexIfNotExists(indexName string, tableName string, columnName string, fullText bool) {
if utils.Cfg.SqlSettings.DriverName == "postgres" {
_, err := ss.GetMaster().SelectStr("SELECT to_regclass($1)", indexName)
_, err := ss.GetMaster().SelectStr("SELECT $1::regclass", indexName)
// It should fail if the index does not exist
if err == nil {
return