Re: proposal: alternative psql commands quit and exit - Mailing list pgsql-hackers

From Daniel Vérité
Subject Re: proposal: alternative psql commands quit and exit
Date
Msg-id 94e59791-e788-4ebb-80a9-9c871ff5df64@manitou-mail.org
Whole thread Raw
In response to proposal: alternative psql commands quit and exit  (Everaldo Canuto <everaldo.canuto@gmail.com>)
Responses Re: proposal: alternative psql commands quit and exit  (Ryan Murphy <ryanfmurphy@gmail.com>)
Re: proposal: alternative psql commands quit and exit  (Everaldo Canuto <everaldo.canuto@gmail.com>)
Re: proposal: alternative psql commands quit and exit  (Robert Haas <robertmhaas@gmail.com>)
Re: proposal: alternative psql commands quit and exit  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers
    Everaldo Canuto wrote:

> Oracle's sqlplus uses "quit" or "exit" and MySQL client can be exited using
> "quit" and "exit" but for compatibility with psql, it also supports "\q"
> and "\quit".

When looking at the most popular postgres questions on stackoverflow:

https://stackoverflow.com/questions/tagged/postgresql?sort=votes

the first one (most up-voted) happens to be:

"How to exit from PostgreSQL command line utility: psql"

now at 430k views and 1368 upvotes.

Independently of the syntax-compatibility with other tools,
it can be a miserable experience for people who almost
never use psql to type "quit" or "exit" after they're done
with whatever they wanted to do, and nothing
happens except a tiny change in the prompt.

Implementing it is easy, but it might be a hard sell for the project
because it creates a precedent.
The next question in that list is "PostgreSQL DESCRIBE TABLE", so
why not implement "desc tablename;" as a synonym for
"\d tablename"?

The question after that is "Show tables in PostgreSQL", so
why not implement "show tablename;"? Well, this one is
impossible because SHOW is already a SQL command that does
something else, so that's already the end of that road to
compatibility.

Personally I'm +1 on accepting the additional "exit" and "quit"
as synonyms for \q, to comply with the "Do What I Mean" UX rule,
rather than just compatibility with other tools.
I guess this is why "help" is already a synonym of \h.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


pgsql-hackers by date:

Previous
From: Nikolay Samokhvalov
Date:
Subject: Re: proposal: alternative psql commands quit and exit
Next
From: Ryan Murphy
Date:
Subject: Re: proposal: alternative psql commands quit and exit