pg_dump, --exclude-table-data

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: zvolsky(at)seznam(dot)cz
Subject: pg_dump, --exclude-table-data
Date: 2020-02-01 08:33:38
Message-ID: 158054601828.19845.6369701897413049638@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/app-pgdump.html
Description:

I cannot find and understand what happens, if I will ommit the table data
for a table where primary keys are refenced by foreignkeys from other
tables. I think the integrity will break and such backup/dump is
unusable...? Or is there a way how to handle this during restore?

(What I want to do is anonymize the content. I don't want to give user data
(User table), but lot of foreignkeys reference them. Something like
exporting all the rows with only primary key and foreign keys (which meet my
needs if just int/bigint are used for keys) + random content in other
fields. I understand that this is difficult to achieve and the completely
omiitted data will be ok - if there is not integrity problem during
restore.)

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2020-02-01 17:18:28 Users/Roles do not align.
Previous Message PG Doc comments form 2020-02-01 07:44:24 Exsamples for COPY