Skip to content

Commit 6b70c48

Browse files
authored
Merge pull request #350 from KoenDierckx/postgrescontrib
postgresql version >=10 onwards does not require contrib package
2 parents 0c3c397 + 53f23f1 commit 6b70c48

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

manifests/database/postgresql.pp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@
5959
# Only install pg_trgm extension, if database it is actually managed by the module
6060
if $manage_database {
6161

62-
# get the pg contrib to use pg_trgm extension
63-
class { '::postgresql::server::contrib': }
62+
# from postgresql version 10 onwards, this extension is no longer inside
63+
# the contrib package, but is being bundled with the postgresql package itself
64+
if versioncmp($postgres_version, '10') < 0 {
65+
# get the pg contrib to use pg_trgm extension
66+
include postgresql::server::contrib
67+
}
6468

6569
postgresql::server::extension { 'pg_trgm':
6670
database => $database_name,

0 commit comments

Comments
 (0)