mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 00:20:55 +00:00
commit
3bb4ca5adc
@ -592,7 +592,7 @@ func (d *dbBase) InsertOrUpdate(q dbQuerier, mi *modelInfo, ind reflect.Value, a
|
|||||||
row := q.QueryRow(query, values...)
|
row := q.QueryRow(query, values...)
|
||||||
var id int64
|
var id int64
|
||||||
err = row.Scan(&id)
|
err = row.Scan(&id)
|
||||||
if err.Error() == `pq: syntax error at or near "ON"` {
|
if err != nil && err.Error() == `pq: syntax error at or near "ON"` {
|
||||||
err = fmt.Errorf("postgres version must 9.5 or higher")
|
err = fmt.Errorf("postgres version must 9.5 or higher")
|
||||||
}
|
}
|
||||||
return id, err
|
return id, err
|
||||||
|
Loading…
Reference in New Issue
Block a user