Re: SHOW TABLES

From: David Christensen <david(at)endpoint(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Aaron W(dot) Swenson" <aaron(dot)w(dot)swenson(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SHOW TABLES
Date: 2010-07-15 20:21:38
Message-ID: C0EFCFFE-B9BA-4761-9B8C-07A1ED80572D@endpoint.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Jul 15, 2010, at 2:45 PM, Heikki Linnakangas wrote:

> 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.

This sounds roughly like the patch I submitted in January (linked upthread), although that swiped the input before it hit the backend. I don't know if I like the idea of that HINT or not.

Regards,

David
--
David Christensen
End Point Corporation
david(at)endpoint(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-07-15 20:37:00 Re: bg worker: overview
Previous Message Richard Huxton 2010-07-15 20:15:37 Re: SHOW TABLES