From: gzh <gzhcoder@126.com>
To: pgsql-general@lists.postgresql.org
Subject: pg_dump without setting search_path
Date: Thu, 25 Aug 2022 10:50:31 +0800 (CST)
Message-ID: <4ee8e848.1efe.182d2e88b8c.Coremail.gzhcoder@126.com> (raw)
When I use pg_dump to export schema from a database, it adds the following line at the beginning:
SELECT pg_catalog.set_config('search_path', '', false);
Is it possible set an option where pg_dump will not add this line?
It is causing issues later when I try to execute other SQL commands, without the schema qualifier.
This is the pg_dump command I am using right now:
pg_dump -O -x -h <db-host> -p <db-port> -U <db-user> -d <db-name> --schema public --schema-only > public-schema.sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: gzhcoder@126.com
Subject: Re: pg_dump without setting search_path
In-Reply-To: <4ee8e848.1efe.182d2e88b8c.Coremail.gzhcoder@126.com>
References: <4ee8e848.1efe.182d2e88b8c.Coremail.gzhcoder@126.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox