Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall
Date: 2021-03-03 17:21:21
Message-ID: a420fb1c-c0e1-b5d5-f4eb-bb889aec6d87@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01.03.21 11:12, Michael Banck wrote:
> postgres(at)kohn:~$ pg_dump --create-only -p 65432 -d test -h /tmp | egrep -v '^($|--|SET)'
> SELECT pg_catalog.set_config('search_path', '', false);
> CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'de_DE.UTF-8';
> ALTER DATABASE test OWNER TO postgres;
> \connect test
> SELECT pg_catalog.set_config('search_path', '', false);
> GRANT CONNECT ON DATABASE test TO test;

I find this option name confusing, because evidently it prints out
things that are not CREATE commands. For example, an intuitive idea of
"create only" might be to omit GRANT commands.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-03-03 17:25:50 Re: proposal: type info support functions for functions that use "any" type
Previous Message Peter Eisentraut 2021-03-03 17:17:28 Re: Pg14, pg_dumpall and "password_encryption=true"