Add support for using a database URI

As this is useful when working with pg_tmp.
This commit is contained in:
Christopher Baines 2019-10-08 19:45:41 +01:00
parent ab8a02cf13
commit 356a5954b2

View file

@ -37,7 +37,9 @@
"dbname=guix_data_service user=guix_data_service") "dbname=guix_data_service user=guix_data_service")
" application_name='guix-data-service " name "'")) " application_name='guix-data-service " name "'"))
(let* ((conn (connect-to-postgres-paramstring paramstring))) (let* ((conn (connect-to-postgres-paramstring
(or (getenv "GUIX_DATA_SERVICE_DATABASE_URI")
paramstring))))
(with-throw-handler (with-throw-handler
#t #t
(lambda () (lambda ()