Re: proposal: alternative psql commands quit and exit

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: proposal: alternative psql commands quit and exit
Дата
Msg-id CAMsr+YE_tu88crPvjNCdpVHA_ud7PHSdHAFFu3rnM1HAK7KmXQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: alternative psql commands quit and exit  (Geoff Winkless <pgsqladmin@geoff.dj>)
Ответы Re: proposal: alternative psql commands quit and exit  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On 12 December 2017 at 23:02, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
I wouldn't exactly say -1 but it's a "meh" from me.

On 8 December 2017 at 13:57, Daniel Vérité" <daniel@manitou-mail.org> wrote:
> "How to exit from PostgreSQL command line utility: psql"
>
> now at 430k views and 1368 upvotes.

There is also stackexchange question with 51000 views that asks how to
start the postgresql client. Should we rename psql to mysql to help
new users too?

Frankly, that's a legit question and I don't think it's one we should be mocking. The application is "PostgreSQL" and it's not at all surprising that people don't find it immediately obvious that the client is "psql". Yes, we have a manual, but if they have to refer to it for something that trivial then that's an opportunity for us to improve UX.

Especially since "postgres" isn't on the PATH in most installs.

I'd suggest having 'postgres' print a help msg suggesting "the client program is psql"... but that does no good if you get

$ postgres
bash: postgres: command not found...
Install package 'postgresql-server' to provide command 'postgres'? [N/y] 

(then there's the Ubuntu versions that "helpfully" suggest you might want to install postgres-xc. Seriously. WTF, people.)

Ctrl-D works almost everywhere.

... if you are used to using a command line interface and know it even exists.

It takes 2 seconds to find the answer
and there are going to be many other things you have to find out if
you're coming at PostgreSQL from a different DB.

Yep. But that doesn't mean we should make the simple things harder than they need to be. Why have \? at all!
 
As others have pointed out, there are _far_ more frustrating things
(like the lack of SHOW CREATE [TABLE|etc]... support in the backend)

I cannot overemphasise the importance of that one. I don't care that much about the spelling, tbh, but the fact that table metadata formatting and display is done wholly client-side and cannot be used in applications is absolutely horrid, and a real wart in the system. If we had the server-side functionality then some special case HINTs in error messages for common systems would be reasonable enough.

Frankly that's probably a good idea anyway, adding a specific errhint. But it's really a separate topic.


--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Haribabu Kommi
Дата:
Сообщение: Re: [HACKERS] SERIALIZABLE with parallel query
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Parallel Index Scan vs BTP_DELETED and BTP_HALF_DEAD