Re: Separate psql commands from arguments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Separate psql commands from arguments
Дата
Msg-id 9876.1207350979@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Separate psql commands from arguments  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Brendan Jurd" <direvus@gmail.com> writes:
>> +1 for dropping this quirk.  And, if there are no objections (or other
>> takers), I volunteer to write a patch.

> Regardless of whether we go ahead with this (and I'm not fond of it primarily
> because I want \c& to "work"),

Perhaps the useful part of the old behavior could be kept by allowing
the command name to be terminated by punctuation as well as whitespace.
("Punctuation" being all nonletters except "+", since we already accept
"+" in command names --- or alternatively we could consider the "+" as
the first argument?)  Would that cover all the cases you are used to
using?

> I think we would still be better off keeping
> the aliases in a separate namespace from psql commands and having an explicit
> command for calling them.

+1.  As I already said, the psql command namespace is so dense that it's
going to be real hard to actually use aliases unless we separate them
somehow.

However, the invoking command has to be pretty dang short or typing it
will negate the point of having aliases.  Perhaps something like this:
if your alias is "foo" you invoke it as "\-foo ...".
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Separate psql commands from arguments
Следующее
От: Aidan Van Dyk
Дата:
Сообщение: Re: modules