Re: Confusing long option in pg_receivexlog/basebackup/dumpall
От | Heikki Linnakangas |
---|---|
Тема | Re: Confusing long option in pg_receivexlog/basebackup/dumpall |
Дата | |
Msg-id | 5181FF79.3090902@vmware.com обсуждение исходный текст |
Ответ на | Confusing long option in pg_receivexlog/basebackup/dumpall (Pavan Deolasee <pavan.deolasee@gmail.com>) |
Ответы |
Re: Confusing long option in pg_receivexlog/basebackup/dumpall
|
Список | pgsql-hackers |
On 02.05.2013 08:43, Pavan Deolasee wrote: > Hi All, > > While looking at the help message of pg_basebackup, I got a bit confused by > it. It looks something like this: > > Connection options: > -d, --dbname=CONNSTR connection string > > So the long option says "--dbname" which is not really what its expecting. > The same issue also applies to pg_receivexlog and pg_dumpall. I wonder if > this is a well thought out user API or just an oversight when we chose to > use "-d" to pass connection string to the command, In fact, I would have > avoided using either -d or --dbname because they are used very frequently > in other commands to mean something else. It's deliberate, although I admit it's confusing. The manual explains it: > -d connstr > --dbname=connstr > > Specifies parameters used to connect to the server, as a connection string. See Section 31.1.1 for more information. > > The option is called --dbname for consistency with other client applications, but because pg_basebackup doesn't connectto any particular database in the cluster, database name in the connection string will be ignored. In other tools too, like psql, you can pass a connection string with -d/--dbname, which is why I thought it would be best to use the same option for passing a connection string to pg_basebackup/pg_dumpall too. See discussion at http://www.postgresql.org/message-id/512520FE.6050701@vmware.com. If you have any better ideas, I'm all ears... - Heikki
В списке pgsql-hackers по дате отправления: