---
name: "cdist-type__postgres_extension"
section: "7"
platform: "linux"
package: "cdist"
version: "7.0.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdist-type__postgres_extension"
---

# cdist-type\_\_postgres\_extension(7)

Manage PostgreSQL extensions

## NAME

cdist-type\_\_postgres\_extension - Manage PostgreSQL extensions

## DESCRIPTION

This cdist type allows you to manage PostgreSQL extensions.

The **\_\_object\_id** to pass to **\_\_postgres\_extension** is of the form **dbname:extension**, e.g.:

```
rails_test:unaccent
```

**CAUTION!** Be careful when installing extensions from (untrusted) third-party sources:

```
Installing an extension as superuser requires trusting that the extension's
author wrote the extension installation script in a secure fashion. It is
not terribly difficult for a malicious user to create trojan-horse objects
that will compromise later execution of a carelessly-written extension
script, allowing that user to acquire superuser privileges.
– https://www.postgresql.org/docs/13/sql-createextension.html#id-1.9.3.64.7
```

## OPTIONAL PARAMETERS

- **state**

  either **present** or **absent**, defaults to **present**.

## EXAMPLES

```
# Install extension unaccent into database rails_test
__postgres_extension rails_test:unaccent
# Drop extension unaccent from database fails_test
__postgres_extension rails_test:unaccent --state absent
```

## SEE ALSO

- •

  [**cdist-type\_\_postgres\_database**(7)](/cdist-type__postgres_database/7.md)

- •

  PostgreSQL "CREATE EXTENSION" documentation at: *http://www.postgresql.org/docs/current/static/sql-createextension.html*.

## AUTHORS

```
Tomas Pospisek <tpo_deb--@--sourcepole.ch>
Dennis Camera <dennis.camera--@--ssrq-sds-fds.ch>
```

## COPYING

Copyright (C) 2014 Tomas Pospisek, 2021 Dennis Camera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

## COPYRIGHT

ungleich GmbH 2021
