copy/dump database to text/csv files - Mailing list pgsql-general

From William Nolf
Subject copy/dump database to text/csv files
Date
Msg-id 1406228653076.32262@xceleratesolutions.com
Whole thread Raw
Responses Re: copy/dump database to text/csv files  (John R Pierce <pierce@hogranch.com>)
Re: copy/dump database to text/csv files  (Thomas Kellerer <spam_eater@gmx.net>)
Re: copy/dump database to text/csv files  (Francisco Olarte <folarte@peoplecall.com>)
Re: copy/dump database to text/csv files  (Marc Mamin <M.Mamin@intershop.de>)
List pgsql-general

This is probably an easy one for most sql users but I don't use it very often.

 

We have a postgres database that was used for an application we no longer use.  However, we would

like to copy/dump the tables to files, text or csv so we can post them to sharepoint.

 

Copy seems to be what I want.  But it only does one table at a time.  There is 204 tables with a schemaname=public.  I need to be copy the tables with data to files.   I need something like a for

loop which checks if the table is populated if so, copy it to tablename.csv file

 

Any ideas?

 

thanks

Bill Nolf | Sr. Linux Engineer (RHCE)


https://xceleratesolution.sharepoint.com/Shared%20Documents/Xcelerate%20Logos/xCelerate-Logo-(W-Solutions).jpg
8401 Greensboro Dr. #930
McLean, VA 22102

O: 703-275-8461


pgsql-general by date:

Previous
From: Seref Arikan
Date:
Subject: Re: Are queries run completely before a Cursor can be used?
Next
From: John R Pierce
Date:
Subject: Re: copy/dump database to text/csv files