How to export database to CSV file

1143130 pts.
Tags:
CSV file
Database
I need to do this urgent! I have my database that I need to export into a CSV file. What's the best way to do that? Can I do it using PostgreSQL? This needs to be for the whole database (not just a table). Thanks!
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    What do mean by whole database? All the tables, stored procedures, functions?? You want it all in one CSV file? Can you provide more details on what the project is supposed to do?
    132,950 pointsBadges:
    report
  • carlosdl
    I don't think that can be done in a single command.

    You could, however, write a procedure to loop through the data dictionary and execute the COPY command on each table to export it to a CSV file.

    But this would export only tables. Other types of objects would not be included (which makes sense, as they are not data that can be written as CSV).
    84,745 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: