calendar Last updated: 19 November 2026
Data integration
How to's

How to Connect PostgreSQL to ChatGPT (2 Steps, No Code)

Try It Free

Connect your data in 1 min. Free forever plan

Got insights from this post? Give it a boost by sharing with others!

To connect PostgreSQL to ChatGPT, add your PostgreSQL table to Windsor.ai with your database details, then install the Windsor.ai plugin in ChatGPT. You can then ask about the table in plain language, and ChatGPT answers from the rows Windsor.ai returns. You don’t write SQL or export a CSV first.

ChatGPT’s plugin directory has no PostgreSQL plugin from OpenAI. Some Postgres hosts, such as Supabase and Neon, have their own plugins for databases they host.

🚀 Connect PostgreSQL to ChatGPT with Windsor.ai. Start free → onboard.windsor.ai/app/postgresql

Once the table is connected, you can ask questions such as:

  • What was revenue by channel for closed-won leads in my leads table this month?
  • How many signups did my customers table get in each of the last four weeks?
  • Which refund reasons grew in the last 7 days compared with the 7 days before?
  • What is my blended ROAS this month, using revenue from PostgreSQL and spend from Google Ads and Meta Ads?

Questions that cover more than 30 days, or that combine PostgreSQL with Google Ads and Meta Ads after the first 30 days, need a paid plan.

Watch: connect PostgreSQL to ChatGPT

Ways to connect PostgreSQL to ChatGPT

PostgreSQL data reaches ChatGPT through a third-party plugin such as Windsor.ai, a plugin from your database host, a CSV export or your own code.

  • Windsor.ai plugin: install it from ChatGPT’s plugin directory and sign in. You add each PostgreSQL table in Windsor.ai once, with your host, port, user, password, database, schema and table name. PostgreSQL is read-only through Windsor.ai (write actions list). You can also connect Google Ads, GA4, Meta Ads and the rest of Windsor.ai’s 350+ sources to the same plugin and ask about them in one chat. It fits marketing and business teams who want answers from a few database tables next to their ad and analytics data.
  • Your host’s plugin: Supabase has its own plugin in ChatGPT’s directory, which runs SQL queries on Supabase databases and lists Read and Write capabilities. Neon and Fly.io also have plugins for the Postgres databases they host. Check each plugin’s page for what it can read and change.
  • Other database plugins: the directory also lists third-party plugins that query several databases, such as QueryBear and connectpak. Compare the access they ask for (read-only or not), the other sources they carry and the price before you choose.
  • CSV export: run a query in your database, export the result as CSV and upload the file to a chat. It fits one question about a fixed result. The file does not update, and a new question about other rows needs a new export.
  • Your own code: build your own connection, for example a GPT Action that calls your own API, which queries PostgreSQL, or your own MCP server. It gives full control but needs engineering work and upkeep.

Steps to connect PostgreSQL to ChatGPT with Windsor.ai

Connecting PostgreSQL to ChatGPT takes two steps. First add your PostgreSQL table to Windsor.ai, then add the Windsor.ai plugin in ChatGPT.

Windsor.ai’s documentation has the ChatGPT setup too: how to add Windsor.ai to ChatGPT.

For a short overview with more prompt ideas, see the PostgreSQL to ChatGPT integration page.

Prerequisites

  • A database user with read access. The user needs CONNECT on the database, USAGE on the schema and SELECT on the table you want ChatGPT to read. Windsor.ai reads only what that user can see.
  • Your connection details: host, port, database, schema and table name, and the user’s password.
  • Network access for Windsor.ai. If your database limits access by IP address, allow Windsor.ai’s IP address. The connect screen shows it (94.130.231.239 on 19 November 2026).
  • A ChatGPT account. The Windsor.ai plugin is in ChatGPT’s plugin directory.
  • A Windsor.ai account. The free forever plan needs no credit card and covers one data source, one account and 30 days of history. For the first 30 days you can connect up to 10 sources. To keep PostgreSQL and your ad or analytics sources connected after that, paid plans start at 19 USD a month for 3 sources (Basic) or 99 USD a month for 7 (Standard), billed annually (pricing).

Step 1. Add your PostgreSQL table to Windsor.ai

  1. Open onboard.windsor.ai/app/postgresql and sign in to Windsor.ai, or create a free account.
  2. Allow Windsor.ai’s IP address to reach your database server, if your database limits access by IP.
  3. On the connect screen, fill in:
    • Host and Port: your database server, for example db.example.com and 5432. On Supabase, Windsor.ai’s connect screen recommends the Transaction Pooler (port 6543).
    • User and Password: the database user from the prerequisites.
    • Database, Schema and Table: the table you want ChatGPT to read.
  4. Select Add Account. The connection appears in the list under the form.

Each connection covers one table. To let ChatGPT read another table or a view from the same database, fill in the form again with its name. Tables in one database count as one account on your plan. A view works if the user has SELECT access to it.

Windsor.ai form to connect a PostgreSQL table with host, port, user, password, database, schema and table

Step 2. Add the Windsor.ai plugin in ChatGPT

  1. In ChatGPT, select Plugins in the sidebar and search for Windsor.ai, or open the Windsor.ai plugin page.
  2. Select Install plugin (if it is already installed, you see Try in chat) and sign in with the same Windsor.ai account you used in step 1.
  3. In a chat, pick Windsor.ai from the + menu or type @Windsor.ai, then ask your first question.
Windsor.ai plugin page in ChatGPT

Start with a question that confirms the connection and shows the columns ChatGPT can use:

@Windsor.ai Which columns can you read from my PostgreSQL table through Windsor.ai?

In our test, ChatGPT listed the table’s 8 columns plus a few fields Windsor.ai adds, such as today’s date.

ChatGPT listing the columns of a PostgreSQL table it can read through the Windsor.ai plugin

What our test returned

On 19 November 2026 we connected a 45-row demo table of leads with columns such as pipeline_stage, revenue, channel and created_at. We asked for revenue by channel for closed-won leads created from 1 February to 31 March 2026.

  • Windsor.ai returns rows, not totals. A request sent straight to Windsor.ai came back as 18 rows, one per closed-won lead, for ChatGPT to add up. Added up, that is 91,550 for Google Ads (15 leads) and 16,300 for Facebook Ads (3 leads).
  • ChatGPT counted the leads correctly but added one total wrong. We asked the same question in two new chats. In one chat, ChatGPT added the Google Ads revenue 500 too high, at 92,050. The other chat got every figure right.
  • A request with no date range returned every row. In our test (paid plan), a request that named no date column and no period returned all 45 rows.

Our test account is on a paid plan. On the free forever plan, the same question can reach back 30 days only.

ChatGPT showing PostgreSQL revenue by channel for closed-won leads through the Windsor.ai plugin

In our Google Sheets and Snowflake tests on the same day, ChatGPT added the rows correctly when the prompt told it to use code. Ask ChatGPT to add up or count the rows with code, and check a total against your own query the first time you use a table.

How to ask about PostgreSQL tables in ChatGPT

Prompts about PostgreSQL work best when they name the table, the date column and the columns you mean.

  • Name the date column. A table can have several dates (created_at, paid_at, updated_at). Write “using created_at as the date” in the prompt. In our test (paid plan), a request that named no date column and no period returned every row, which can time out on a big table.
  • Give the period. On the free forever plan, a date-based question on a table with a date column can reach back 30 days at most. A table without a date column returns its current rows. A quarter, 12 months or year over year needs a paid plan.
  • Say what a column means. ChatGPT gets the column names and values but not what a column includes. If revenue includes tax or refunds in your table, say so in the prompt.

Prompts to try with PostgreSQL data in ChatGPT

Replace the table and column names with your own.

Revenue by channel

@Windsor.ai From my leads table, show revenue and the number of leads by channel for closed-won leads created in the last 30 days, using created_at as the date. Add up the rows with code.

Signups per week

@Windsor.ai From my customers table, count signups for the last 28 days, using created_at as the date, split into four 7-day periods, and flag any period more than 30% below the average. Count the rows with code.

Week-over-week change by reason

@Windsor.ai From my refunds table, compare the total refund amount by reason for the last 7 days against the 7 days before, using refunded_at as the date. Sort by the largest increase.

Data quality check

@Windsor.ai From my orders table, count the rows per day for the last 30 days, using order_date as the date, and list the days with no rows or fewer than half the daily average. Count the rows with code.

Blending PostgreSQL with other sources in ChatGPT

PostgreSQL often holds data that ad platforms do not have, such as orders from your own backend, leads from your CRM or subscription changes. With PostgreSQL and an ad source connected to the same Windsor.ai account, ChatGPT can put them side by side in one answer. ChatGPT matches them on a shared column, such as the date or the campaign name.

@Windsor.ai For the last 30 days, take daily revenue from my PostgreSQL orders table, using order_date as the date, and daily spend from Google Ads and Meta Ads. Show total spend, total revenue and blended ROAS (revenue divided by total spend) per day. Add up the rows with code.

Keeping PostgreSQL and two ad sources connected after the first 30 days needs the Basic plan (3 sources) or higher. Related guides: how to connect Google Ads to ChatGPT, how to connect GA4 to ChatGPT and, for other databases, how to connect BigQuery to ChatGPT and how to connect Snowflake to ChatGPT.

How the Windsor.ai plugin works with PostgreSQL and ChatGPT

When you ask a question, ChatGPT asks the Windsor.ai plugin for the table, columns, date range and filters it needs. Windsor.ai reads those rows from PostgreSQL and returns them, and ChatGPT answers from the result, as text, a table or a summary. ChatGPT does not send SQL to your database.

  • Read only: ChatGPT cannot insert, update or delete rows through the plugin, because Windsor.ai has no write actions for PostgreSQL (write actions list).
  • Cache: Windsor.ai keeps query results for 6 hours. If a table changed in the last few hours, the same question can return the earlier result.
  • Access: Windsor.ai reads only the tables you add in step 1, with the privileges of the database user you entered. You enter the password in Windsor.ai, not in the chat, and it stays with Windsor.ai. ChatGPT never gets the password or a direct connection to your database, only access through the Windsor.ai plugin, which is read-only for PostgreSQL. To end the access, remove the connection in Windsor.ai, or drop the database user.
  • Large tables: Windsor.ai has no documented row cap for PostgreSQL, but a large request can time out after about 3 minutes. A short period or a filter on a column such as status or channel keeps a request small.

If something does not work

  • Add Account fails: check the host, port, database name, user and password, and that Windsor.ai’s IP address can reach your server. On Supabase, Windsor.ai’s connect screen recommends the Transaction Pooler (port 6543).
  • ChatGPT says it cannot find PostgreSQL: check that you signed in to the same Windsor.ai account in ChatGPT and in step 1, and that the PostgreSQL connection shows in the list under the form on the PostgreSQL connect screen in Windsor.ai.
  • ChatGPT returns no rows: check that the database user has SELECT on the table, that the period in your prompt has data in the date column you named, and, on the free forever plan, that the period is within the last 30 days.
  • The request is slow or times out: name a date column and a short period in the prompt, or filter on a column.
  • Numbers differ from your own query: check that the prompt and your query use the same date column, period and filters, that the prompt asked ChatGPT to add up the rows with code, and that the table did not change within the 6-hour cache window.

Conclusion

The Windsor.ai plugin gives ChatGPT read access to your PostgreSQL tables in two steps, and you can add Google Ads, GA4 or Meta Ads to the same chat for blended reports. If your database is on Supabase and you want ChatGPT to run its own SQL queries, Supabase’s plugin is another route.

For the same setup in another assistant, see how to connect PostgreSQL to Claude. Other ChatGPT sources are on the ChatGPT integrations hub.

🚀 Connect PostgreSQL to ChatGPT with Windsor.ai. Free forever plan, no credit card → onboard.windsor.ai/app/postgresql

FAQs

Do I need to write SQL to ask ChatGPT about PostgreSQL data?

No. You ask in plain language and name the table and columns you mean. Windsor.ai reads the rows, and ChatGPT writes the answer. Knowing your table and column names helps more than knowing SQL. If you want a separate read-only database user, your database admin can create it once before step 1: CREATE USER, then GRANT CONNECT on the database, GRANT USAGE on the schema and GRANT SELECT on the table.

Tired of juggling fragmented data? Get started with Windsor.ai today to create a single source of truth

Let us help you automate data integration and AI-driven insights, so you can focus on what matters, growth strategy.
g logo
fb logo
big query data
youtube logo
power logo
looker logo