-X flag in pg_dump

Started by Dennis Bjorklundalmost 20 years ago6 messages
#1Dennis Bjorklund
db@zigo.dhs.org

What use is the -X flag to pg_dump. The code say that if one add a setting
"feature" to -X then there should also be a flag "--feature". So we have
for example:

-X disable-triggers

and

--disable-triggers

If all the -X flags come in a long form as well, then what use is the -X
at all? Why would one want to use -X disable-triggers instead of
--disable-triggers ?

--
/Dennis Bj�rklund

#2Dennis Bjorklund
db@zigo.dhs.org
In reply to: Dennis Bjorklund (#1)
Re: -X flag in pg_dump

On Thu, 26 Jan 2006, Dennis Bjorklund wrote:

What use is the -X flag to pg_dump?

Let me just state before someone else does, that I don't want to remove
-X. The question is if one should add new flags to it or simply just use
the long form for new ones.

--
/Dennis Bj�rklund

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Dennis Bjorklund (#1)
Re: -X flag in pg_dump

Dennis Bjorklund wrote:

What use is the -X flag to pg_dump. The code say that if one add a setting
"feature" to -X then there should also be a flag "--feature". So we have
for example:

-X disable-triggers

and

--disable-triggers

If all the -X flags come in a long form as well, then what use is the -X
at all? Why would one want to use -X disable-triggers instead of
--disable-triggers ?

The issue is that some operating systems do not support long options, so
-X option is really -X and an argument, while --option is a long option.

We have our own getopt.c library so I am unsure we really need have
cases that don't support long options anymore.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Dennis Bjorklund (#1)
Re: -X flag in pg_dump

Dennis Bjorklund wrote:

If all the -X flags come in a long form as well, then what use is the
-X at all? Why would one want to use -X disable-triggers instead of
--disable-triggers ?

This was added before we had portable long options. I suppose we could
phase it out.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#4)
Re: -X flag in pg_dump

Peter Eisentraut wrote:

Dennis Bjorklund wrote:

If all the -X flags come in a long form as well, then what use is the
-X at all? Why would one want to use -X disable-triggers instead of
--disable-triggers ?

This was added before we had portable long options. I suppose we could
phase it out.

Excellent idea. Let's start by deprecating it in a prominent note in
pg_dump.c. Maybe Dennis could add that to whatever patch he's preparing.

cheers

andrew

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Peter Eisentraut (#4)
Re: -X flag in pg_dump

Peter Eisentraut wrote:

Dennis Bjorklund wrote:

If all the -X flags come in a long form as well, then what use is the
-X at all? Why would one want to use -X disable-triggers instead of
--disable-triggers ?

This was added before we had portable long options. I suppose we could
phase it out.

Yes, I think you are right.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073