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

# Postgres

Postgres is configured with a single `datasource` property. It should follow the following format:
`postgres://username:password@host:port/database`.

Example:

<Tabs>
  <Tab title="model.yaml">
    ```yaml theme={null}
    # DATABASE_URL defined as environment variable as
    # postgres://username:password@host:port/database
    datasource: ${env.DATABASE_URL}
    query: select * from users;
    ```
  </Tab>

  <Tab title="model.sql">
    ```sql theme={null}
    ---DATABASE_URL defined as environment variable as
    ---postgres://username:password@host:port/database
    --{{ config "datasource" "postgresql://${env.PG_USER}:${env.PG_PASS}@${env.PG_HOST}:${env.PG_PORT:5432}/${env.PG_DB}?sslmode=no-verify&schema=newjitsu" }}
    select * from users;
    ```
  </Tab>
</Tabs>
