longurl
longurl copied to clipboard
Postgresql config
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"
你更新一下最新的源码然后填pgx试试
非常抱歉,才看到,试了一下会提示如下错误
FATA[0000] Failed creating schema resources: sql/schema: unsupported dialect "pgx"
= =整不来postgres,暂时用mysql了