Search Postgresql Archives

Re: initdb createuser commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/2016 03:31 AM, Samuel Williams wrote:
(For some reason the first time I sent this message it was blocked due
to the keyword "sub-". So, I've changed that and am re-sending.)

I think there is an opportunity here to make the experience for new
users better.

Firstly, I think having one or two top level commands, perhaps pga
[postgres admin], and pg [postgres client], with well documented
subcommands. Ideally `man pg` would tell you all the client commands
and `man pga` would tell you all the server commands. It could even be
implemented in the same way git is implemented with subcommands (e.g.
git foo maps to git-foo internally).

When I see a bare command like `initdb` I wonder where that comes
from, how it relates to postgres and it also concerns me that it
doesn't seem to be obviously part of postgres. The same, when I saw
`createuser` I wondered if that was a postgres command, or an OS level
user creation command, or something else. It's one more thing that I
have to look up.

This is a cognitive load during the time when a new user is already
struggling to come to grips with all the other facets of the system. 7
+/- 2.

It's hard for a new user to know what commands are available because
the naming of commands doesn't follow any consistent structure. I
can't type pg<tab> and see something. In contrast `mysqladmin` has a
really good summary (similar to pg_ctl). Additionally, I'd gently
suggest that underscore in commonly used commands can be a pain for
certain keyboard layouts, even for me I have to use the shift key to
get type the command. `pgctl` would be easier to type.

While this may seem really trivial, to a new user it's not a great
experience out of the box.

I think these things could be really easy to improve (low hanging
fruit) and make the experience a lot better. Given how awesome
postgres is in other areas, it's disappointing that the command line
tools don't reflect the same level of engineering and thoughtfulness.

On 29 October 2016 at 16:36, Samuel Williams
<space.ship.traveller@xxxxxxxxx> wrote:
I think there is an opportunity here to make the experience for new
users better.

Firstly, I think having one or two top level commands, perhaps pga
[postgres admin], and pg [postgres client], with well documented
sub-commands. Ideally `man pg` would tell you all the client commands
and `man pga` would tell you all the server commands. It could even be
implemented in the same way git is implemented with sub-commands (e.g.
git foo maps to git-foo internally).

When I see a bare command like `initdb` I wonder where that comes
from, how it relates to postgres and it also concerns me that it
doesn't seem to be obviously part of postgres. The same, when I saw
`createuser` I wondered if that was a postgres command, or an OS level
user creation command, or something else. It's one more thing that I
have to look up.

This is a cognitive load during the time when a new user is already
struggling to come to grips with all the other facets of the system. 7
+/- 2.

These are the commands a new user will need:

pg_ctl
psql
pg_dump
pg_dumpall
pg_restore




It's hard for a new user to know what commands are available because
the naming of commands doesn't follow any consistent structure. I
can't type pg<tab> and see something. In contrast `mysqladmin` has a
really good summary (similar to pg_ctl). Additionally, I'd gently
suggest that underscore in commonly used commands can be a pain for
certain keyboard layouts, even for me I have to use the shift key to
get type the command. `pgctl` would be easier to type.

While this may seem really trivial, to a new user it's not a great
experience out of the box.

I think these things could be really easy to improve (low hanging
fruit) and make the experience a lot better. Given how awesome
postgres is in other areas, it's disappointing that the command line
tools don't reflect the same level of engineering and thoughtfulness.



On 29 October 2016 at 13:46, John R Pierce <pierce@xxxxxxxxxxxx> wrote:
On 10/28/2016 4:55 PM, Samuel Williams wrote:

Even if maintaining the old commands, they could print
out to stderr "This command is deprecated and now wraps `pg_ctl init`.
Please use that command in the future".


except its the other way around.   pg_ctl initdb invokes initdb, not the
other way around.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux