Re: backing up the data from a single table? - Mailing list pgsql-general

From Ron
Subject Re: backing up the data from a single table?
Date
Msg-id e7fde304-9eff-7f94-9c26-d03ad09dceb1@gmail.com
Whole thread Raw
In response to backing up the data from a single table?  (stan <stanb@panix.com>)
List pgsql-general
On 9/13/19 9:13 AM, stan wrote:
> My development methodology is to create scripts that init the db, and load
> test data, as I make changes.
>
> Now, I am starting to move toward a test instance with real data. The end
> user has provided "real" test data, n spreadsheets. I have the inputing of
> data from these working OK. (takes a bit of hand work). What I would like
> to do, is  continue to init the "test" database. To make that easy, I would
> like to be able to "export" individual tables, so I can use the scripts to
> reload them. I prefer not to have to convert these to my load script
> format.
>
> Is there a way to "export" a single table, that can be easily re
> "imported"?

The COPY command is what you want.

http://postgresguide.com/utilities/copy.html
https://www.postgresql.org/docs/9.6/sql-copy.html

-- 
Angular momentum makes the world go 'round.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG SQL and LIKE clause
Next
From: Ron
Date:
Subject: Re: PG SQL and LIKE clause