Re: Separate psql commands from arguments
От | Peter Eisentraut |
---|---|
Тема | Re: Separate psql commands from arguments |
Дата | |
Msg-id | 200804101450.12853.peter_e@gmx.net обсуждение исходный текст |
Ответ на | Re: Separate psql commands from arguments (Gregory Stark <stark@enterprisedb.com>) |
Ответы |
Re: Separate psql commands from arguments
Re: Separate psql commands from arguments |
Список | pgsql-hackers |
Am Samstag, 5. April 2008 schrieb Gregory Stark: > Regardless of whether we go ahead with this (and I'm not fond of it > primarily because I want \c& to "work"), 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. The very point of this feature is to *not* have them in a separate name space. Shell aliases are commonly used for defining one- or two-letter abbreviations for other commands. No one would be using shell commands if they required you to prefix the call by "mycommand " or something like that. If you want to have a separate namespace, you could just write a function and call it, which uses about as many keystrokes as your proposed \query syntax. > I also don't see any point in allowing aliases which call other psql > commands. psql is not a particularly nice and well defined interface and it > would just make it that much more complex and confusing. But other people do want to use it. If it is too confusing for you, don't use it. That's what's nice about this feature: If you don't use it, it doesn't affect you at all. > I still see it much cleaner and much clearer for people reading the script Aliases are not primarily intended for scripts but for interactive use. No one wants to optimize away a few letters from a script.
В списке pgsql-hackers по дате отправления: