Re: Renaming some binaries

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Euler Taveira <euler(at)timbira(dot)com(dot)br>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Renaming some binaries
Date: 2016-08-26 20:29:11
Message-ID: 20160826202911.GA320593@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On 26 August 2016 at 18:26, Euler Taveira <euler(at)timbira(dot)com(dot)br> wrote:
>
> > I'm bringing this $subject into discussion again. Historically, we are
> > carrying binary names that have been confused newbies. createuser is the
> > worst name so for. Also, names like createdb, initdb, reindexdb, and
> > droplang does not suggest what product it is referring to. Adding a
> > prefix (pg_, pg, ...) would 'make things clear'. If we have a consensus
> > about this change, I suggest renaming the following binaries:

> Why not just remove them all and change the docs to suggest using
>
> psql -c "CREATE DATABASE foo"

I agree that some of these commands are redundant, and that we seem to
have them just because we can, not because they provide useful
functionality:
createdb createlang createuser dropdb droplang dropuser

I would rather have a single command that can do all those actions.
We could have things like
pg_ctl createuser

I agree with Simon that many "serious users" would not be using
the shell to implement this functionality, but something higher-level (a
GUI, some web app) that's going to go through SQL instead. Still, for
ad-hoc admin tasks it seems convenient to have the shell interface.

Nowadays git and many other programs have a model where a single command
(git) can call a number of different binaries which are not in PATH
(/usr/lib/git-core in my installation). We could do something similar,
where little else apart from pg_ctl, pg_dump, pgbench are in path, and
most binaries are in some hidden binary directory known to pg_ctl.

pg_ctl vacuum -j4 <database>

(Personally, I very often have postmaster running on its own terminal
with output to stderr. It'd be a little sad to lose that functionality,
but what value does it offer to regular users? I can script my way
around its lack, if needed.)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-08-26 20:35:03 Re: Renaming some binaries
Previous Message Simon Riggs 2016-08-26 20:18:22 Re: Renaming of pg_xlog and pg_clog