Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZ278-0004jh-K5 for pgsql-general@arkaria.postgresql.org; Fri, 29 Jun 2018 22:43:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fZ276-0007MQ-Ek for pgsql-general@arkaria.postgresql.org; Fri, 29 Jun 2018 22:43:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZ276-0007M0-3g for pgsql-general@lists.postgresql.org; Fri, 29 Jun 2018 22:43:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZ273-0000qQ-Js for pgsql-general@lists.postgresql.org; Fri, 29 Jun 2018 22:43:34 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w5TMhSil004402; Fri, 29 Jun 2018 18:43:28 -0400 From: Tom Lane To: Alvaro Herrera cc: Kevin Brannen , "pgsql-general@lists.postgresql.org" Subject: Re: dumping only table definitions In-reply-to: <20180629223949.tdifrvvqejuqyl2i@alvherre.pgsql> References: <20180629223949.tdifrvvqejuqyl2i@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 29 Jun 2018 18:39:49 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27189.1530312208.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 29 Jun 2018 18:43:28 -0400 Message-ID: <27190.1530312208@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2018-Jun-29, Kevin Brannen wrote: >> I'm trying to figure out how to dump only the table definitions, well t= hose and things they need directly, like sequences & types. What I do NOT = want are all the millions (not literally but it feels like it :)) of funct= ions we have. Triggers would be all right if I must, as we only have a few= of those. > Try "pg_dump -Fc" followed by pg_restore -l. You can edit the list > emitted there, then use it with pg_restore -L. I think something involving "--tables '*.*'" might work, too. Be careful about shell-command quoting. regards, tom lane