longurl icon indicating copy to clipboard operation
longurl copied to clipboard

Postgresql config

Open Orokapei opened this issue 2 years ago • 2 comments

database:
  type: mysql
  dsn: root:123456@tcp(127.0.0.1:3306)/longurl?parseTime=true

这里的配置如果用postgres的话type需要填什么= =填什么都是unknown type 自己搜了下ent的文档 https://entgo.io/docs/sql-integration/#use-pgx-with-postgresql db/client.go如果要支持postgres是不是要用pgx驱动

    "entgo.io/ent/dialect"
    _ "github.com/jackc/pgx/v5/stdlib"

Orokapei avatar Sep 15 '23 00:09 Orokapei

你更新一下最新的源码然后填pgx试试

long2ice avatar Sep 15 '23 07:09 long2ice

非常抱歉,才看到,试了一下会提示如下错误

FATA[0000] Failed creating schema resources: sql/schema: unsupported dialect "pgx"

= =整不来postgres,暂时用mysql了

Orokapei avatar Sep 19 '23 13:09 Orokapei