Closed WaferJay closed 1 month ago
See go-gorm/gorm#5409.
The solution is referenced from https://github.com/go-gorm/gorm/issues/5409#issuecomment-1151949457
db, err := gorm.Open(postgres.New(postgres.Config{ DSN: "host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai", // data source name, refer https://github.com/jackc/pgx PreferSimpleProtocol: true, // disables implicit prepared statement usage. By default pgx automatically uses the extended protocol }), &gorm.Config{})
Have a nice day. :-)
See go-gorm/gorm#5409.
The solution is referenced from https://github.com/go-gorm/gorm/issues/5409#issuecomment-1151949457
Have a nice day. :-)