pg_dump without setting search_path

From: gzh <gzhcoder(at)126(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: pg_dump without setting search_path
Date: 2022-08-25 02:50:31
Message-ID: 4ee8e848.1efe.182d2e88b8c.Coremail.gzhcoder@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-08-25 03:07:46 Re: pg_dump without setting search_path
Previous Message Bryn Llewellyn 2022-08-24 23:27:22 Greg Sabino Mullane ? Re: Two questions about "pg_constraint"