Re: pg_dump without setting search_path

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: gzh <gzhcoder(at)126(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump without setting search_path
Date: 2022-08-25 04:19:03
Message-ID: 9bff3c2f-9de4-cf2c-ded2-accb27917d50@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Kukushkin 2022-08-25 05:23:17 Re: Unable to start replica after failover
Previous Message David G. Johnston 2022-08-25 03:54:21 Re: pg_dump without setting search_path