Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall - Mailing list pgsql-hackers

From Michael Banck
Subject Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall
Date
Msg-id 4298eb77ce4dabadecfc0743886c28482e517ac5.camel@credativ.de
Whole thread Raw
In response to Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall  (Cary Huang <cary.huang@highgo.ca>)
Responses Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall  (Magnus Hagander <magnus@hagander.net>)
Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall  (Nitin Jadhav <nitinjadhavpostgres@gmail.com>)
List pgsql-hackers
Hi,

Am Montag, den 29.03.2021, 17:59 +0000 schrieb Cary Huang:
> I have tried the patch and the new option is able to control the
> contents of pg_dump outputs to include only create db related
> commands. 

Thanks for testing!

> I also agree that the option name is a little misleading to the user
> so I would suggest instead of using "create-only", you can say
> something maybe like "createdb-only" because this option only applies
> to CREATE DATABASE related commands, not CREATE TABLE or other
> objects. In the help menu, you can then elaborate more that this
> option "dump only the commands related to create database like ALTER,
> GRANT..etc"

Well I have to say I agree with Peter that the option name I came up
with is pretty confusing, not sure createdb-only is much better as it
also includes GRANTs etc.

I think from a technical POV it's useful as it closes a gap between
pg_dumpall -g and pg_dump -Fc $DATABASE in my opinion, without having to
potentially schema-dump and filter out a large number of database
objects.

Anybody else have some opinions on what to call this best? Maybe just a
short option and some explanatory text in --help along with it?


Michael

-- 
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: michael.banck@credativ.de

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz




pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Autovacuum on partitioned table (autoanalyze)
Next
From: John Naylor
Date:
Subject: Re: truncating timestamps on arbitrary intervals