> For the complete documentation index, see [llms.txt](https://help.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.felt.com/upload-anything/data-sources/postgres-postgis.md).

# Postgres / PostGIS

Connect Postgres / PostGIS databases, including Supabase, to Felt. Map spatial tables and views from your database.

{% hint style="success" %}
Available on the Business and Enterprise plans. [Compare plans](https://felt.com/pricing#compare)
{% endhint %}

Connect Postgres / PostGIS to add a PostgreSQL database's tables, views, and materialized views to maps or query them with [SQL](/upload-anything/sql-queries.md). Felt must be able to reach the database over the internet. It uses [PostGIS](https://postgis.net/) geometry and geography columns to place features on the map.

{% embed url="<https://youtu.be/77UK-lbBsYw?si=H-AlC7cupkbiaJ59>" %}

## Connect Postgres / PostGIS

Create a read-only database user for Felt with access to the schemas and tables you want to use. Then follow the steps in [Add a source](/upload-anything/data-sources/add-a-source.md#connect-a-source) and select **Postgres / PostGIS**. If the database accepts connections only from known addresses, [allow Felt's IP addresses](/upload-anything/data-sources/add-a-source.md#allow-felts-ip-addresses).

In **Connection**, fill in these fields, or click **Autofill** and paste a connection string such as `postgresql://user:password@database.server.com:5432/dbname`.

| Field    | Required | What to enter                                                                                |
| -------- | -------- | -------------------------------------------------------------------------------------------- |
| Host     | Yes      | The Postgres host name or IP address, such as `db.companyname.com`. It can't be `localhost`. |
| Port     | Yes      | The Postgres port. The default is 5432.                                                      |
| Database | Yes      | The name of the database.                                                                    |
| Username | Yes      | The database user you created for Felt, not your Felt login.                                 |
| Password | Yes      | That user's password. Felt hides it after you save.                                          |
| Schema   | No       | One schema to read. Leave it empty to read all schemas. It can't start with `pg_`.           |

## Connect Supabase

A Supabase database runs Postgres, so it connects as a Postgres / PostGIS source. In the Supabase dashboard, copy the session pooler connection string, not the direct connection string. Then follow [Connect Postgres / PostGIS](#connect-postgres-postgis), click **Autofill**, and paste the string. See [Supabase's guide to connection poolers](https://supabase.com/docs/guides/database/connecting-to-postgres#poolers).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.felt.com/upload-anything/data-sources/postgres-postgis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
