|
|
Subscribe / Log in / New account

Program names and "pollution"

Program names and "pollution"

Posted Apr 3, 2019 2:33 UTC (Wed) by rfunk (subscriber, #4054)
Parent article: Program names and "pollution"

It seems to me that a possible solution would be for a packager to isolate these commands in one pgsql directory, then create a "pg" command in /usr/bin that would take subcommands like git, and would look in the pgsql directory for the subcommands. Then those who really want to run unprefixed "createuser" would have to add the pgsql directory to their PATH, while the rest would run "pg createuser".


to post comments

Program names and "pollution"

Posted Apr 3, 2019 7:35 UTC (Wed) by cavok (subscriber, #33216) [Link]

I was also thinking along this line. Make the legacy names be opt-in so that when legacy references are expected it is easy for the admin to get along. This way new users can start with the clean setup and avoid the lock-in.

Program names and "pollution"

Posted Apr 3, 2019 14:48 UTC (Wed) by cortana (subscriber, #24596) [Link] (5 responses)

I'm afraid that would break for people who use util-linux's 'pg' command as their PAGER.

Program names and "pollution"

Posted Apr 3, 2019 14:56 UTC (Wed) by rfunk (subscriber, #4054) [Link] (2 responses)

Fine, call it pgcmd or anything. The specific name (of the command or the directory) isn't important.

Program names and "pollution"

Posted Apr 4, 2019 17:28 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (1 responses)

pgctl

Program names and "pollution"

Posted Apr 9, 2019 22:54 UTC (Tue) by flussence (guest, #85566) [Link]

Why not both? And to keep things interesting, have them both implement similar functionality, but differ in behaviour just enough to have one completely break when used outside of a completely default setup.

/me glares in pulseaudio's general direction...

Program names and "pollution"

Posted Apr 4, 2019 16:42 UTC (Thu) by perennialmind (guest, #45817) [Link]

Well that's just awful. pg would otherwise be the obvious choice. It's certainly the first thing I'd try tabbing at the console. Actually, thinking back, I think I did exactly that years ago and was peeved to realize what I'd stepped in. Postgres deserves a two-letter namespace prefix. Thankfully most distros have cleared the stinking pile off the path long ago and Debian derivatives will soon.

Whatever anchor they choose, I'll add an alias of my own. pg createuser just feels right.

Program names and "pollution"

Posted Apr 4, 2019 17:23 UTC (Thu) by perennialmind (guest, #45817) [Link]

Those people are already having to adapt. It's been deprecated in util-linux since util-linux v2.23, released in 2013 and hasn't been built by default since v2.29, released in 2016. After 2016, Debian, Ubuntu and Slackware were the outliers still shipping /usr/bin/pg. After Buster is releases as as Debian 10 this year, it'll just be Slackware.

Program names and "pollution"

Posted Apr 7, 2019 20:52 UTC (Sun) by Karellen (subscriber, #67644) [Link]

I wonder if a distro like Debian could try that all by itself.

Package all the client commands into /usr/lib/postgresql/, add a "/usr/bin/pgctl" or similar utility which makes "pgctl <command> [args...]" redirect to "/usr/lib/postgresql/<command> [args...]", and then add a postgresql-legacy package which adds symlinks for "/usr/bin/<command>" to "/usr/lib/postgresql/<command>"

Do it in "sid" as soon as the freeze ends after the next release, see what breaks, and revert back to the current system if it's too bad before the following release. That's what sid is for :-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds