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

# PostgreSQL

> Learn how to configure PostgreSQL as a destination in Artie, including host and port settings, service account creation, schema ownership, and the required database permissions.

## Required settings

* Host name
* Port (default is `5432`)
* Service account

### Creating a service account

<Note>Please make sure you create a service account that has the ability to create on the database and is the owner of all the schemas you plan to sync into.</Note>

```sql theme={null}
-- Create a service account
CREATE USER artie WITH PASSWORD 'password';

-- Grant create on database to the service account, so we can handle creating the necessary schemas.
GRANT CREATE ON DATABASE your_database TO artie;

-- If the schema exists, change the owner to the service account.
-- This is because there are certain DDL operations such as "ALTER TABLE" or "DROP TABLE" that is restricted to the owner.
ALTER SCHEMA schema_name OWNER TO artie;
```
