go-gorm / postgres

GORM PostgreSQL driver
MIT License
225 stars 119 forks source link

No error is raised even if the host does not exist #276

Closed pochuang closed 2 months ago

pochuang commented 3 months ago

The postgres driver does not raise any error even if the host does not exist or with incorrect config.

db, err := gorm.Open(postgres.New(postgres.Config{ DSN: "host=10.110.1.12", PreferSimpleProtocol: true, }), &gorm.Config{SkipDefaultTransaction: true, PrepareStmt: true, NowFunc: core.CurrentTime, NamingStrategy: schema.NamingStrategy{}})

pochuang commented 3 months ago

Got fixed when the GORM version is upgraded from v1.25.5 to v1.25.10.