Re: New 'pg' consolidated metacommand patch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New 'pg' consolidated metacommand patch
Date: 2020-05-27 16:35:12
Message-ID: CA+TgmoYUwD6R6qL0aEg5gCWQ1BAB_rpeYJw8jH9uQu4eukLteA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 27, 2020 at 4:51 AM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> For that reason, I did not change the names of the executables, merely their location. During conversations with Robert off-list, we discussed renaming the executables to things like 'pg-ctl' (hyphen rather than underscore), mostly because that's the more modern way of doing it and follows what 'git' does. To avoid breaking scripts that execute these commands by the old name, this patch doesn't go that far. It also leaves the usage() functions alone such that when they report their own progname in the usage text, they do so under the old name. This would need to change at some point, but I'm unclear on whether that would be for v14 or if it would be delayed.
>
> Ugh, yeah, please don't do that. Renaming them just to make it "look more modern" helps nobody, really. Especially if the suggestion is people should be using the shared-launcher binary anyway.

The way things like 'git' work is that 'git thunk' just looks in a
designated directory for an executable called git-thunk, and invokes
it if it's found. If you want to invent your own git subcommand, you
can. I guess 'git help' wouldn't know to list it, but you can still
get the metacommand to execute it. That only works if you use a
standard naming, though. If the meta-executable has to hard-code the
names of all the individual executables that it calls, then you can't
really make that work.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-05-27 16:53:23 Re: segmentation fault using currtid and partitioned tables
Previous Message Robert Haas 2020-05-27 16:29:00 Re: BufFileRead() error signalling