Hello!
I'm trying to connect to my postgresql database.
I'm trying:
gorm.Open("postgres", fmt.Sprintf(`user=%v password=%v dbname=%v
sslmode=disable ?charset=utf8&parseTime=true`,
"db_user", "db_pass", "db_name"))
and get:
pq: unrecognized configuration parameter "?charset"
With mysql everything works.
How to use this params with postgresql?
Comment From: jinzhu
this is only supported by mysql driver, but not pq driver.
https://github.com/go-sql-driver/mysql#timetime-support
https://github.com/lib/pq
Comment From: faeronsayn
@jinzhu I'm getting this error:
(sql: Scan error on column index 3: unsupported driver -> Scan pair: []uint8 -> *time.Time)
and in other solutions it is suggested to use parseTime=true, but from this it seems like we can't do this if we're on postgres, which is what I am using. What's the solution for postgres?
Comment From: 0x7061
Also interested in the postgres solution!
Comment From: ThomasDotCodes
I realize this is closed, but I'm also looking for a postgres solution.
Comment From: ctfrancia
was there ever a solution?