Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSqlN-0003vj-TB for pgsql-general@arkaria.postgresql.org; Fri, 30 Nov 2018 21:55:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSqlM-0001uZ-Jj for pgsql-general@arkaria.postgresql.org; Fri, 30 Nov 2018 21:55:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSqlK-0001RR-Lm for pgsql-general@lists.postgresql.org; Fri, 30 Nov 2018 21:55:52 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSqlG-0001hB-0x for pgsql-general@postgresql.org; Fri, 30 Nov 2018 21:55:50 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4850821FE0 for ; Fri, 30 Nov 2018 16:55:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 30 Nov 2018 16:55:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=C UIrnLvLlocyAGP9jSH94NACqf5sOc9isUXy0cnkamE=; b=LZBrozfBx2+OXTtrp e/ptIfLOtXlRn4GmXDehLWXBBnpXNBOy12qRI84Y3j/31pGdLhAqBqtWzuUt+pHQ OIKmpIFOzA2qxGRDjcPpaBxRaAe9z16marg38PkC42x1CovqkyrmnJaI3GjH9Cwq cGRBFpxHeHe68ZtHpofFVxmZjwAik4CMg+oHuUZ0hQUW8ix+Ch312UKBK+o4BLP5 rgxH5YG0DnfiQfvXr/4WIrE94SOrIdWHCwFS28YdA89VMjgNO+miS1vOGlEwvvhj hy0sAq69z5XCZ3jv/8m4o2pSWUlp57oXWANz2eMmmHURavrpegEYog4QChjDM7w1 6uErg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=CUIrnLvLlocyAGP9jSH94NACqf5sOc9isUXy0cnka mE=; b=dnevpd2BSrjgRdKjbIRLmjcGX34by2ssKFnNBE3oORgzNlU/GGAi6TQWj /EofwsOLZxyBjbeBevqJvfA1PiJ1AOMF+36z7cra7ZjfTS55on4Jui2T07WJTvhZ yHiQCqv8ZUDfNfQf7BhThWYlJFX/Q5LwWsJUEQ3uK6N2hfZs+Y7FgVEsTdRfjj89 p2hpDEVGlGZ3tpVbkFyFiDpeImO2/IEcIaQD/xMsBGxDvBRoQQaQ15K5KPqgUVC8 9ROltoj6T00155obSIbYskKpKRmBiUmB0ugc5Rk6JP/OHik60f4nWEro3P3bLkrW 5Kho8h9gzpWhBRukivNicyrtyWMew== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 9308CE455D for ; Fri, 30 Nov 2018 16:55:43 -0500 (EST) Subject: Re: Dump table using pg_dump vs pg_restore -f To: pgsql-general References: From: Adrian Klaver Message-ID: Date: Fri, 30 Nov 2018 13:55:42 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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