How to connect to postgresql using url

前端 未结 5 1827
予麋鹿
予麋鹿 2020-12-28 12:35

I had asked an earlier question which did not get any replies.

Basically I get an error invalid database url when I try to do heroku db:push

5条回答
  •  生来不讨喜
    2020-12-28 12:53

    according to documentation

    postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
    

    examples

    postgresql://
    postgresql://localhost
    postgresql://localhost:5432
    postgresql://localhost/mydb
    postgresql://user@localhost
    postgresql://user:secret@localhost
    postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
    postgresql://localhost/mydb?user=other&password=secret
    

提交回复
热议问题