pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Dump table using pg_dump vs pg_restore -f
Date: Fri, 30 Nov 2018 13:55:42 -0800
Message-ID: <d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.com> (raw)
In-Reply-To: <b7a24043-1c9c-1876-f06a-8f916293c142@aklaver.com>
References: <b7a24043-1c9c-1876-f06a-8f916293c142@aklaver.com>

On 11/29/18 7:31 AM, Adrian Klaver wrote:
> Postgres 10.6
> 
> I am getting different output using:
> 
> pg_dump -d production -U postgresĀ  -s -t container -f cont.sql
> 
> vs
> 
> pg_restore -s -t container -f container.sql production_112818.out
> 

> 
> In the docs:
> 
> https://www.postgresql.org/docs/10/app-pgrestore.html
> 
> I see:
> 
> "
> Note
> 
> This flag does not behave identically to the -t flag of pg_dump. There 
> is not currently any provision for wild-card matching in pg_restore, nor 
> can you include a schema name within its -t.
> "
> 
> That to me reads that the difference is for the search method for table 
> names only.
> 
> The description for:
> -t table
> 
> Includes:
> 
> "Restore definition and/or data of only the named table. ..."
> 
> That in my mind would include the PK and the table triggers.
> 
> Am I misunderstanding?
> 

Just wondering,  am I the only one seeing this issue?

Am I doing something wrong?


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (2+ messages)

Message-ID: <d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.com>
Permalink:  ../d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.com/
Also on:    postgresql.org/message-id/d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.com

 · 

reply

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: adrian.klaver@aklaver.com
  Subject: Re: Dump table using pg_dump vs pg_restore -f
  In-Reply-To: <d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.com>
  References: <b7a24043-1c9c-1876-f06a-8f916293c142@aklaver.com> <d3602a98-2d42-760a-12df-50e62ceb83c1@aklaver.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