# PostgreSQL

Via the Postgres destination, Hightouch can create and update rows in a Postgres table.

## Unique Identifiers

Hightouch requires a unique identifier in the destination Postgres table in order to add, remove, and update rows. The column must be either a `UNIQUE` or `PRIMARY KEY` column. At least one Hightouch field must map to a unique column.

If you're unsure whether your mapping includes a compatible column, just try it! Hightouch will error if you need to change your mappings.

## Column Types

Hightouch works out of the box with all standard column types, including:

* `BIGINT`
* `INT`
* `TEXT`
* `VARCHAR`
* `TIMESTAMPTZ`
* `BOOLEAN`
* `DECIMAL`

If you see type errors, it may be because your SQL query is producing the wrong format. Message us on Intercom if you need help!

## Required Permissions

Your Postgres credentials must be able to:

* Add/update/delete rows from the destination table.
* View the `INFORMATION_SCHEMA.COLUMNS`,

  `INFORMATION_SCHEMA.TABLE_CONSTRAINTS`, and

  `INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE` tables. This is used for

  gathering metadata needed for the sync.

## Compatible Versions

The minimum supported Postgres version is `9.5` (Hightouch relies on `ON CONFLICT` for updating rows).
