with oids option not removed in pg_dumpall

Started by Surafel Temesgenover 6 years ago5 messages
#1Surafel Temesgen
surafel3000@gmail.com
1 attachment(s)

Hello,
Commit 578b229718e8f remove oids option from pg_dump but its is
still in pg_dumpall .The attach patch remove it
regards
Surafel

Attachments:

remove-oids-option-pg_dumpall.patchtext/x-patch; charset=US-ASCII; name=remove-oids-option-pg_dumpall.patchDownload
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 24c8c031d6..b35c702f99 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -130,20 +130,6 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>
 
-     <varlistentry>
-      <term><option>-o</option></term>
-      <term><option>--oids</option></term>
-      <listitem>
-       <para>
-        Dump object identifiers (<acronym>OID</acronym>s) as part of the
-        data for every table.  Use this option if your application references
-        the <acronym>OID</acronym>
-        columns in some way (e.g., in a foreign key constraint).
-        Otherwise, this option should not be used.
-       </para>
-      </listitem>
-     </varlistentry>
-
      <varlistentry>
       <term><option>-O</option></term>
       <term><option>--no-owner</option></term>
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 102731ea0c..38c5bc6eb2 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -107,7 +107,6 @@ main(int argc, char *argv[])
 		{"host", required_argument, NULL, 'h'},
 		{"dbname", required_argument, NULL, 'd'},
 		{"database", required_argument, NULL, 'l'},
-		{"oids", no_argument, NULL, 'o'},
 		{"no-owner", no_argument, NULL, 'O'},
 		{"port", required_argument, NULL, 'p'},
 		{"roles-only", no_argument, NULL, 'r'},
@@ -211,7 +210,7 @@ main(int argc, char *argv[])
 
 	pgdumpopts = createPQExpBuffer();
 
-	while ((c = getopt_long(argc, argv, "acd:E:f:gh:l:oOp:rsS:tU:vwWx", long_options, &optindex)) != -1)
+	while ((c = getopt_long(argc, argv, "acd:E:f:gh:l:Op:rsS:tU:vwWx", long_options, &optindex)) != -1)
 	{
 		switch (c)
 		{
@@ -252,10 +251,6 @@ main(int argc, char *argv[])
 				pgdb = pg_strdup(optarg);
 				break;
 
-			case 'o':
-				appendPQExpBufferStr(pgdumpopts, " -o");
-				break;
-
 			case 'O':
 				appendPQExpBufferStr(pgdumpopts, " -O");
 				break;
@@ -628,7 +623,6 @@ help(void)
 	printf(_("  -c, --clean                  clean (drop) databases before recreating\n"));
 	printf(_("  -E, --encoding=ENCODING      dump the data in encoding ENCODING\n"));
 	printf(_("  -g, --globals-only           dump only global objects, no databases\n"));
-	printf(_("  -o, --oids                   include OIDs in dump\n"));
 	printf(_("  -O, --no-owner               skip restoration of object ownership\n"));
 	printf(_("  -r, --roles-only             dump only roles, no databases or tablespaces\n"));
 	printf(_("  -s, --schema-only            dump only the schema, no data\n"));
#2Michael Paquier
michael@paquier.xyz
In reply to: Surafel Temesgen (#1)
Re: with oids option not removed in pg_dumpall

On Tue, May 21, 2019 at 09:31:48AM +0300, Surafel Temesgen wrote:

Commit 578b229718e8f remove oids option from pg_dump but its is
still in pg_dumpall .The attach patch remove it

Good catch. Your cleanup looks correct to me. Andres, perhaps you
would prefer doing the cleanup yourself?
--
Michael

#3Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#2)
Re: with oids option not removed in pg_dumpall

On Tue, May 21, 2019 at 05:24:57PM +0900, Michael Paquier wrote:

Good catch. Your cleanup looks correct to me. Andres, perhaps you
would prefer doing the cleanup yourself?

As I am cleaning up the area for another issue, applied.
--
Michael

#4Surafel Temesgen
surafel3000@gmail.com
In reply to: Michael Paquier (#3)
Re: with oids option not removed in pg_dumpall

Thank you for applying

regards
Surafel

On Thu, May 23, 2019 at 3:43 AM Michael Paquier <michael@paquier.xyz> wrote:

Show quoted text

On Tue, May 21, 2019 at 05:24:57PM +0900, Michael Paquier wrote:

Good catch. Your cleanup looks correct to me. Andres, perhaps you
would prefer doing the cleanup yourself?

As I am cleaning up the area for another issue, applied.
--
Michael

#5Andres Freund
andres@anarazel.de
In reply to: Surafel Temesgen (#4)
Re: with oids option not removed in pg_dumpall

Hi,

On 2019-05-23 16:26:38 +0300, Surafel Temesgen wrote:

Thank you for applying

regards
Surafel

On Thu, May 23, 2019 at 3:43 AM Michael Paquier <michael@paquier.xyz> wrote:

On Tue, May 21, 2019 at 05:24:57PM +0900, Michael Paquier wrote:

Good catch. Your cleanup looks correct to me. Andres, perhaps you
would prefer doing the cleanup yourself?

As I am cleaning up the area for another issue, applied.

Thanks for finding and applying.

Greetings,

Andres Freund