Re: SHOW TABLES

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: "Aaron W(dot) Swenson" <aaron(dot)w(dot)swenson(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SHOW TABLES
Date: 2010-07-15 19:45:26
Message-ID: 4C3F6556.5060907@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15/07/10 19:06, Aaron W. Swenson wrote:
> The best solution is to offer a hint to the user in psql when they submit
> 'SHOW . . . .' with a response like: SHOW . . . . is not a valid command.
> Perhaps you mean \d . . . .

+1. That doesn't force us to implement a whole new set of commands and
syntax to describe stuff in the backend, duplicating the \d commands,
but is polite to the users, and immediately guides them to the right
commands.

You could even do that in the backend for a few simple commands like
SHOW TABLES:

ERROR: syntax error at "SHOW TABLES"
HINT: To list tables in the database, SELECT * FROM pg_tables or use the
\d psql command.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-07-15 19:47:20 Re: Listen/Notify in 9.0
Previous Message Greg Sabino Mullane 2010-07-15 19:43:47 Re: SHOW TABLES