update our postgresql index check to work with 9.2+ versions of postgresql

Этот коммит содержится в:
JoramWilander
2015-07-28 12:42:17 -04:00
родитель 2602f3b49e
Коммит c45cf5514f

Просмотреть файл

@@ -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