pg_dumpall ignores --globals-only

Lists: pgsql-bugs
From: "Dan Langille" <dan(at)langille(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_dumpall ignores --globals-only
Date: 2003-03-06 19:25:49
Message-ID: 3E675A6D.7505.10E83253@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi folks...

Can anyone else confirm this on 7.3.2?

$ pg_dumpall --globals_only
pg_dumpall: unrecognized option `--globals_only'
Try 'pg_dumpall --help' for more information.

-g works OK.

I seem to recall this problem arising before. I've had confirmation
that the problem exists in 7.3.
--
Dan Langille : http://www.langille.org/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dan Langille" <dan(at)langille(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dumpall ignores --globals-only
Date: 2003-03-06 21:21:41
Message-ID: 18286.1046985701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"Dan Langille" <dan(at)langille(dot)org> writes:
> $ pg_dumpall --globals_only
> pg_dumpall: unrecognized option `--globals_only'

There seems to be a bit of a disconnect between the code, the usage
message, and the long_options table in pg_dumpall :-(. I'll see
about cleaning it up, but in the meantime -g might work.

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dan Langille" <dan(at)langille(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dumpall ignores --globals-only
Date: 2003-03-06 21:49:48
Message-ID: 23718.1046987388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"Dan Langille" <dan(at)langille(dot)org> writes:
> $ pg_dumpall --globals_only
> pg_dumpall: unrecognized option `--globals_only'

Looks like it's just a one-liner oversight. I'm not sure whether -g
will work on your platform; if not, use the attached patch.

regards, tom lane

*** src/bin/pg_dump/pg_dumpall.c.orig Thu Jan 16 10:28:06 2003
--- src/bin/pg_dump/pg_dumpall.c Thu Mar 6 16:45:57 2003
***************
*** 77,82 ****
--- 77,83 ----
{"inserts", no_argument, NULL, 'd'},
{"attribute-inserts", no_argument, NULL, 'D'},
{"column-inserts", no_argument, NULL, 'D'},
+ {"globals-only", no_argument, NULL, 'g'},
{"host", required_argument, NULL, 'h'},
{"ignore-version", no_argument, NULL, 'i'},
{"oids", no_argument, NULL, 'o'},


From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Dan Langille <dan(at)langille(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dumpall ignores --globals-only
Date: 2003-03-06 22:14:59
Message-ID: 1046988899.1313.10.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Thu, 2003-03-06 at 19:25, Dan Langille wrote:
> Hi folks...
>
> Can anyone else confirm this on 7.3.2?
>
> $ pg_dumpall --globals_only

In fact it should be "globals-only" (hyphen, not underscore), but even
when spelt correctly it doesn't work.

> pg_dumpall: unrecognized option `--globals_only'
> Try 'pg_dumpall --help' for more information.
>
> -g works OK.
>
> I seem to recall this problem arising before. I've had confirmation
> that the problem exists in 7.3.

It doesn't work in 7.3.2. It doesn't work in CVS tip either.
pg_dumpall.c needs an extra line in the long arguments definition:

RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dumpall.c,v
retrieving revision 1.14
diff -u -r1.14 pg_dumpall.c
--- pg_dumpall.c 2003/02/14 19:40:42 1.14
+++ pg_dumpall.c 2003/03/06 22:06:25
@@ -81,6 +81,7 @@
{"inserts", no_argument, NULL, 'd'},
{"attribute-inserts", no_argument, NULL, 'D'},
{"column-inserts", no_argument, NULL, 'D'},
+ {"globals-only", no_argument, NULL, 'g'},
{"host", required_argument, NULL, 'h'},
{"ignore-version", no_argument, NULL, 'i'},
{"oids", no_argument, NULL, 'o'},

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The LORD is my light and my salvation; whom shall I
fear? the LORD is the strength of my life; of whom
shall I be afraid?" Psalms 27:1


From: Dan Langille <dan(at)langille(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_dumpall ignores --globals-only
Date: 2003-03-07 11:47:18
Message-ID: 20030307064652.Q78466@xeon.unixathome.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Thu, 6 Mar 2003, Tom Lane wrote:

> "Dan Langille" <dan(at)langille(dot)org> writes:
> > $ pg_dumpall --globals_only
> > pg_dumpall: unrecognized option `--globals_only'
>
> There seems to be a bit of a disconnect between the code, the usage
> message, and the long_options table in pg_dumpall :-(. I'll see
> about cleaning it up, but in the meantime -g might work.

Yes, -g did work for me.