services: databases: Deprecate the postgresql-service procedure.

Using the service type directly is a better approach, making it easier to
configure the service.

* gnu/services/databases.scm (postgresql-service): Deprecate this procedure.
* doc/guix.texi (PostgreSQL): Update the documentation for the use of (service
postgresql-service-type).
This commit is contained in:
Christopher Baines 2020-10-02 19:06:50 +01:00
parent 93576e4475
commit a698df72d3
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577
2 changed files with 39 additions and 15 deletions

View file

@ -30,6 +30,7 @@
#:use-module (gnu packages databases)
#:use-module (guix build-system trivial)
#:use-module (guix build union)
#:use-module (guix deprecation)
#:use-module (guix modules)
#:use-module (guix packages)
#:use-module (guix records)
@ -281,12 +282,13 @@ host all all ::1/128 md5"))
(compose list postgresql-configuration-postgresql))))
(default-value (postgresql-configuration))))
(define* (postgresql-service #:key (postgresql postgresql)
(port 5432)
(locale "en_US.utf8")
(config-file (postgresql-config-file))
(data-directory "/var/lib/postgresql/data")
(extension-packages '()))
(define-deprecated (postgresql-service #:key (postgresql postgresql)
(port 5432)
(locale "en_US.utf8")
(config-file (postgresql-config-file))
(data-directory "/var/lib/postgresql/data")
(extension-packages '()))
postgresql-service-type
"Return a service that runs @var{postgresql}, the PostgreSQL database server.
The PostgreSQL daemon loads its runtime configuration from @var{config-file}