[HACKERS] Removing binaries (was: createlang/droplang deprecated) - Mailing list pgsql-hackers

From Magnus Hagander
Subject [HACKERS] Removing binaries (was: createlang/droplang deprecated)
Date
Msg-id CABUevExPrfPH5K5qM=zsT7tvfyACe+i5qjA6bfWCKKYrh8MJLw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)  (Andreas Karlsson <andreas@proxel.se>)
Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] Removing binaries (was: createlang/droplang deprecated)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
>> 2017-03-18 14:00 GMT+01:00 Peter Eisentraut <peter.eisentraut@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?

--

pgsql-hackers by date:

Previous
From: Jan Michálek
Date:
Subject: Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Allow interrupts on waiting standby