From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: backing up the data from a single table?
Date: Fri, 13 Sep 2019 09:27:58 -0500
Message-ID: <e7fde304-9eff-7f94-9c26-d03ad09dceb1@gmail.com> (raw)
In-Reply-To: <20190913141351.GC27035@panix.com>
References: <20190913141351.GC27035@panix.com>
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.htmlhttps://www.postgresql.org/docs/9.6/sql-copy.html
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: backing up the data from a single table?
In-Reply-To: <e7fde304-9eff-7f94-9c26-d03ad09dceb1@gmail.com>
References: <20190913141351.GC27035@panix.com> <e7fde304-9eff-7f94-9c26-d03ad09dceb1@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox