Want to disable fully qualified table names on pg_dump in pg_dump (PostgreSQL) 9.6.8

From: Foolish Ewe <foolishewe(at)hotmail(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Want to disable fully qualified table names on pg_dump in pg_dump (PostgreSQL) 9.6.8
Date: 2018-03-15 23:00:09
Message-ID: MWHPR14MB160079A6D9DC64A2F60E9004C0D00@MWHPR14MB1600.namprd14.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All:

A number of our team members and I use pg_dump to export schema in an Ubuntu 16.04 environment, I happen to have a postgress 9.6.4 server
that runs in a docker container, and in some cases I see the following select statement and fully qualified table names in the
CREATE TABLE and ALTER TABLE statements:

SELECT pg_catalog.set_config('search_path', '', false);

CREATE TABLE database_name.table_name

and likewise for ALTER TABLE.

But other users (who haven't updated their systems recently) do not see the SELECT statement and we see unqualified table names, e.g.:

CREATE TABLE table_name

These changes in format impact our workflows, we would prefer to have unqualified table names.

So far I've made some docker containers (to minimize interactions or config errors at the host level), and in the containers the
following pg_dump client versions all have this behavior.

--
-- PostgreSQL database dump
--

-- Dumped from database version 9.6.4
-- Dumped by pg_dump version 9.6.8

-- Started on 2018-03-15 21:49:58 UTC

and

--
-- PostgreSQL database dump
--

-- Dumped from database version 9.6.4
-- Dumped by pg_dump version 10.3 (Ubuntu 10.3-1.pgdg16.04+1)

-- Started on 2018-03-15 22:20:47 UTC

The pg_dump command we run is:

pg_dump --verbose -d postgresql://our_server_user:xxxx(at)localhost:5433/server --column-inserts -t table1 -t table2 ... -t tableN --schema-only

Does anyone have an idea of what might cause this? Is there something we can do on the client side to avoid getting qualified table names?

With best regards:

Bill

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-03-15 23:09:38 Re: Want to disable fully qualified table names on pg_dump in pg_dump (PostgreSQL) 9.6.8
Previous Message Stephen Frost 2018-03-15 22:05:12 Re: SELECT .. FOR UPDATE: find out who locked a row