Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWkS3-0000Pb-2r for pgsql-general@arkaria.postgresql.org; Thu, 07 May 2020 17:36:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWkS1-0005Jw-Nx for pgsql-general@arkaria.postgresql.org; Thu, 07 May 2020 17:36:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWkRz-0005Jh-UG for pgsql-general@lists.postgresql.org; Thu, 07 May 2020 17:36:49 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWkRv-0003fs-AU for pgsql-general@lists.postgresql.org; Thu, 07 May 2020 17:36:47 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 175C16F1; Thu, 7 May 2020 13:36:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 May 2020 13:36:40 -0400 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=fm2; bh=a Arb9PF0V7tUVqrP1bRhvtjmlSnG8M723mUGTl5fZxA=; b=LxnAlPuOC1hiPJXo0 iFiiWPT9L0ywWro4y84Ad737rd4sjR8hW1m4tFaAW6IvQLaBDVmEYaY2yBJvaTQK ozyxEVJifzLgPPP4BTI1geT20mFMEGbpMYTBfRU221myiBadRUdCncG3Lor/bLyl TxZMn1gzOv8qMzT+0Umg/AaqqowS74w/2gKsUjERj3b8BMVLBh9JGz9HLJohNgVp LS50rZ5iFPTWz+UbMRAR1ZtXpNTAOk+8SFS5mZGaOj8dqAnScbJulSxVbSWOTjuT LjQXcHhNT3MWZNSaHJ7YjG8/N0N4iPFJaS6SNVB5V6sCN6WtWBb8p6sdlvfdeyBc yAcGw== 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=fm2; bh=aArb9PF0V7tUVqrP1bRhvtjmlSnG8M723mUGTl5fZ xA=; b=nbR9gfRiJg3VU2T9Nbx6gk8IAQ5BpxuqqD955D88HAzwlQnS1KcAcsBPs bbegNzHoFDhTNYWvR1QEAz09U1Oghcf1lM99ngqufnjWBlwK07QyvEBjfd8eLOZl hArDKk/gX1VJvYFftUHFCDJpSTaskP/xSgodCVDj4xiRze4MnlLS/tV0VsZPVeAD VWC+X4/Cvd2q5qxmn0Xm/w9fniCTrsVF0zVDZEAzHep1iN94ogih2CCh6t+eYY/J ucyJBtD2duIZP7VAJHmsPooMQA3a2jWTN5LAM9yx9W41QScYvJgYWW6bHIMrHlCd eMZ0Obiqh2pFBhI6fcheWheSaYWmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkedtgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeduudefjeetveffhefgudehtdfhvdetkeeiueehfeev veduteekleeuheegudehhfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cukfhppeejhedrudejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrd gtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 294713280065; Thu, 7 May 2020 13:36:39 -0400 (EDT) Subject: Re: pg_dump negation regex To: =?UTF-8?Q?Eudald_Valc=c3=a0rcel_Lacasa?= , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <3e1c0334-dcbf-54d1-1d51-939acf1d826d@aklaver.com> Date: Thu, 7 May 2020 10:36:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.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 5/7/20 9:53 AM, Eudald ValcĂ rcel Lacasa wrote: > Hello! > I've been looking at the documentation and there seems to be no keyword > for negation purposes. > > Am I missing something? Or it's like this? https://www.postgresql.org/docs/12/app-pgdump.html -T pattern --exclude-table=pattern Do not dump any tables matching pattern. The pattern is interpreted according to the same rules as for -t. -T can be given more than once to exclude tables matching any of several patterns. When both -t and -T are given, the behavior is to dump just the tables that match at least one -t switch but no -T switches. If -T appears without -t, then tables matching -T are excluded from what is otherwise a normal dump. For what patterns you can use see: https://www.postgresql.org/docs/12/app-psql.html#APP-PSQL-PATTERNS > > I'm trying to use pg_dump to create a database skeleton and I have > tables like program_0, program_1, etc. And I'd like to dump all the > tables but client_1 onwards. > > Does anybody happen to know a way to accomplish it? > > Thank you! > Eudald -- Adrian Klaver adrian.klaver@aklaver.com