> ## Documentation Index
> Fetch the complete documentation index at: https://docs.configu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL

> Integrates the Configu Orchestrator with [PostgreSQL](https://www.postgresql.org).

* Name: PostgreSQL
* Category: Database

## Configuration

Configu needs to be authorized to access your PostgreSQL database. Configu utilizes [TypeORM](https://typeorm.io) under the hood to establish a connection with the database using [data source options](https://typeorm.io/data-source-options#postgres--cockroachdb-data-source-options) you need to supply.

## Usage

### `.configu` store declaration

```yaml theme={null}
stores:
  my-store:
    type: postgresql
    configuration:
      host: localhost
      username: test
      password: test
      database: test
```

### CLI examples

#### Upsert command

```bash theme={null}
configu upsert --store "my-store" --set "test" --schema "./start.cfgu.json" \
    -c "GREETING=hey" \
    -c "SUBJECT=configu node.js sdk"
```

#### Eval and export commands

```bash theme={null}
configu eval --store "my-store" --set "test" --schema "./start.cfgu.json" \
 | configu export
```

## References

* Integration documentation: [https://www.postgresql.org/docs/current/tutorial-start.html](https://www.postgresql.org/docs/current/tutorial-start.html)
* TypeORM documentation: [https://typeorm.io](https://typeorm.io)
