Re: pg_dump without setting search_path - Mailing list pgsql-general

From Adrian Klaver
Subject Re: pg_dump without setting search_path
Date
Msg-id 9bff3c2f-9de4-cf2c-ded2-accb27917d50@aklaver.com
Whole thread Raw
In response to Re:Re: pg_dump without setting search_path  (gzh <gzhcoder@126.com>)
Responses Re:Re: pg_dump without setting search_path
List pgsql-general
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



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_dump without setting search_path
Next
From: Alexander Kukushkin
Date:
Subject: Re: Unable to start replica after failover