Magnus Hagander <mag...@hagander.net> writes:
>> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut <
peter.eisentr...@2ndquadrant.com>:
>>> I just noticed that createlang and droplang have been listed as
>>> deprecated since PG 9.1.
>>> Do we dare remove them?

> (I'd extend it to all the non-prefixed pg binaries, but let's open that
can
> of worms right now, one thing at a time)

> To my mind, these two and createuser/dropuser are the only really serious
> namespacing problems among our standard binaries.  The ones with names
> ending in "db" don't seem likely to cause huge confusion.  I suppose that
> if we were naming it today, "psql" wouldn't get that name; but the chances
> of renaming that one are certainly zero, namespace conflict or no.

> But createuser/dropuser are a real problem, because they certainly could
> be mistaken for system-level utilities.

Yeah, I've seen people use those and get quite confused. Luckily they don't
tend to *break* things, but it's definitely namespace pollution.

If we look through the binaries we have now that are not prefixed with pg_:

clusterdb, vacuumdb, reindexdb - while not clear that they are about
*postgres*, it's pretty clear they're about a database. I wouldn't name
them without pg_ today, but I doubt it's worth chaning. They also add
actual value (being able to process multiple things)

createdb, dropdb - also not clear they're about postgres, more likely to be
used by mistake but not that bad. That said, do they add any *value* beyond
what you can do with psql -c "CREATE DATABASE"? I don't really see one, so
I'd suggest dropping these too.

createuser, dropuser - definitely pollutes the namespace, people do
sometimes try them for the wrong thing. Unlike the db ones they do add
value though -- I don't think we have a psql way of in a single command
doing what --pwprompt on createuser does, do we? But given that we are in
the process of breaking a lot of other scripts for 10, perhaps we should
rename it to pg_createuser?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Reply via email to