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 1oR4Kn-0007XZ-A9 for pgsql-general@arkaria.postgresql.org; Thu, 25 Aug 2022 04:19:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oR4Km-0001LF-1c for pgsql-general@arkaria.postgresql.org; Thu, 25 Aug 2022 04:19:12 +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 1oR4Kk-0001L5-SD for pgsql-general@lists.postgresql.org; Thu, 25 Aug 2022 04:19:11 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oR4Kh-0002ng-8P for pgsql-general@lists.postgresql.org; Thu, 25 Aug 2022 04:19:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 292635C01B6; Thu, 25 Aug 2022 00:19:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 25 Aug 2022 00:19:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1661401145; x= 1661487545; bh=Bxv/OHvl3achpdmNreODltlT7nfuJ27UI/S7S/DH1Ho=; b=S FSUCLafJITK0QGwdwXVda5mXdyWg2fTBojN1ZoW5L5+GiP78sb8rPqLVqKPp9ImG VDRTTc4fzYSxY0JkPaB0zGoSzL68Tap4qOjnrf3clKqqqVh2NOnltlY2VXzerEQ0 lu3gnQId92LflrSJG255KMGlIVqWTJg034wID8Tah8ei5n9NYz9QLjvVtuoOv8JH KjgRnVellKNahcR/2duUMMl8eIJ+Y72L8meNMVvme3UBTbc2/oFZQbDvdjR3hEFP hkvACzUZR3+/NHhLYvgKUdPxdlkpRgmLXF2lMQlWsHcE1LNPhZ1gXZERLRYwCRY5 hUdqw5q26Q9tcbWqymP1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1661401145; x= 1661487545; bh=Bxv/OHvl3achpdmNreODltlT7nfuJ27UI/S7S/DH1Ho=; b=S McUSWnNTPoyjrNyCnvyB6mLU1Y57kxj933e97ECJ6Iqe2c2x/cXteJQdumBnOFDT XXQ+3Vse//UNhQkEAtRL9Yum3VPBTgm9aUUZtr914uY10Fb9Lfe3e+57gqFcEB1F wlpK3RzpnrI7gpQwyKywlh6q8yvFsBSpJG5HMXZRhB8IQDMat+ifUxcUe1cfP5b/ whldZ/DF20OQiEoGuqxwZgFevHsz+cfiZ9+YJZtOBPTOcfeOx9ka6/UsEL7UNrbu cMFgutGh9kQmGURNBoS/Z6iBIiyQE+fOmrGCfJRYk96otK7ihgR76zBkrrt4u6Qb qIm0qx9t+r0Xuvq1FJUgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejvddgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpedtgfdvgf eikeeftddvffekvefggfevgffgheelieeltdejffffffehgfffhedvffenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdr tghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Aug 2022 00:19:04 -0400 (EDT) Message-ID: <9bff3c2f-9de4-cf2c-ded2-accb27917d50@aklaver.com> Date: Wed, 24 Aug 2022 21:19:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: pg_dump without setting search_path Content-Language: en-US To: gzh , Tom Lane Cc: pgsql-general@lists.postgresql.org References: <4ee8e848.1efe.182d2e88b8c.Coremail.gzhcoder@126.com> <1331174.1661396866@sss.pgh.pa.us> <7146ecd6.2920.182d3152247.Coremail.gzhcoder@126.com> From: Adrian Klaver In-Reply-To: <7146ecd6.2920.182d3152247.Coremail.gzhcoder@126.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/24/22 20:39, gzh wrote: > Hi Tom, > > Thank you for your prompt response. > > When I use pg_dump to export schema from an older version of PostgreSQL > 8.2.3 , it adds the following line at the beginning: > > SET search_path = public, pg_catalog; > > Is it possible set an option where pg_dump will add this line in > PostgreSQL 12.5? > No for this reason: https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path >> regards, tom lane -- Adrian Klaver adrian.klaver@aklaver.com