2

I've generated a large table (1.1 million rows) in Postgres/PGAdmin that I'd like to export to CSV. When I click the "Save results to file (F8)" button, I get the "Downloading Results..." spinning wheel, and then the window letting me name the CSV and save it where I want on my computer. But once that CSV is on my computer it's empty. I've tried restarting PGAdmin and my computer but it's still happening.

Does anyone know why this is happening / how to fix? I would just copy/paste the table into a text file, but I think it's too large.

I couldn't find any prior questions about this.

Thanks.

2
  • 1
    It creates the file, then populates it. How long are you waiting before you try to open it? It probably hasn't finished downloading. Commented Feb 17, 2022 at 17:59
  • Ah, that could be it, I'll try waiting longer, thanks. Commented Feb 17, 2022 at 19:10

1 Answer 1

3

I ran into the same problem. My solution was to create a table using your intended select statement.

Example:

CREATE TABLE query_results AS (

Select * from XXXX

)

Then, export the table to CSV.

Sign up to request clarification or add additional context in comments.

1 Comment

use codeblock for the example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.