vapor / fluent-postgres-driver

🐘 PostgreSQL driver for Fluent.
MIT License
149 stars 53 forks source link

Database name not correctly extracted from URL path. #29

Closed karolpad closed 6 years ago

karolpad commented 6 years ago

Branch: nio

Swift Version: Swift 4.1 Snapshot 2018-03-16

When making a new Postgres database configuration using the database url in the format

postgres://user:password@host:port/databaseName

the database name extracted from the URL is prefixed with the "/" (which is expected behavior of of URL(string: "some url")?.path) and therefore the connection to the postgres database cannot be made successfully.

Tested same database config using PostgreSQLDatabaseConfig(hostname: port: username: , database: password: ) and connection to database worked fine so I know the database name is correct.

Sorry wrong repo. Moved to vapor/postgresql