fix: ignore DefaultPostgresSchema

This commit is contained in:
Bo-Yi Wu 2018-04-08 21:54:13 +08:00
parent f74ba0cf5c
commit ed84bb2b2c
1 changed files with 1 additions and 0 deletions

View File

@ -549,6 +549,7 @@ func (engine *Engine) tableName(beanOrTableName interface{}) (string, error) {
func (engine *Engine) tbSchemaName(v string) string { func (engine *Engine) tbSchemaName(v string) string {
if engine.dialect.DBType() == core.POSTGRES && if engine.dialect.DBType() == core.POSTGRES &&
engine.dialect.URI().Schema != "" && engine.dialect.URI().Schema != "" &&
engine.dialect.URI().Schema != DefaultPostgresSchema &&
strings.Index(v, ".") == -1 { strings.Index(v, ".") == -1 {
return engine.dialect.URI().Schema + "." + v return engine.dialect.URI().Schema + "." + v
} }