From 83c703f09f092c5f3919934fdd97bcfd450d9ab2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Mon, 3 Apr 2017 09:15:25 +0200 Subject: [PATCH] Support for alternative postgres URI scheme According to the PostgreSQL documentation (section 32.1.1.2), postgres library supports two URI schemes: postgresql:// and postgres:// Reference: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING --- driver/postgres/postgres.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver/postgres/postgres.go b/driver/postgres/postgres.go index fc6e144f..77e2ae2c 100644 --- a/driver/postgres/postgres.go +++ b/driver/postgres/postgres.go @@ -139,5 +139,7 @@ func (driver *Driver) Version() (uint64, error) { } func init() { - driver.RegisterDriver("postgres", &Driver{}) + drv := Driver{} + driver.RegisterDriver("postgres", &drv) + driver.RegisterDriver("postgresql", &drv) }