summaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorJonas Wielicki <j.wielicki@sotecware.net>2017-11-28 18:52:56 +0100
committerlouiz’ <louiz@louiz.org>2017-12-02 20:08:50 +0100
commit4f7ad3f9855cf62649c40d912e6c3a6a2b777913 (patch)
tree01ef894ff70b72672ad334eb40b6c848d0e33d3e /src/database
parent0168b96b79db2627fdba77a8712956408aa081d1 (diff)
downloadbiboumi-4f7ad3f9855cf62649c40d912e6c3a6a2b777913.tar.gz
biboumi-4f7ad3f9855cf62649c40d912e6c3a6a2b777913.tar.bz2
biboumi-4f7ad3f9855cf62649c40d912e6c3a6a2b777913.tar.xz
biboumi-4f7ad3f9855cf62649c40d912e6c3a6a2b777913.zip
Support for full postgresql URIs
(cf. https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING)
Diffstat (limited to 'src/database')
-rw-r--r--src/database/database.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp
index b1a5ba5..19e9988 100644
--- a/src/database/database.cpp
+++ b/src/database/database.cpp
@@ -37,7 +37,7 @@ void Database::open(const std::string& filename)
std::unique_ptr<DatabaseEngine> new_db;
static const auto psql_prefix = "postgresql://"s;
if (filename.substr(0, psql_prefix.size()) == psql_prefix)
- new_db = PostgresqlEngine::open("dbname="s + filename.substr(psql_prefix.size()));
+ new_db = PostgresqlEngine::open(filename);
else
new_db = Sqlite3Engine::open(filename);
if (!new_db)