Re: SHOW TABLES - Mailing list pgsql-hackers

From Robert Haas
Subject Re: SHOW TABLES
Date
Msg-id AANLkTin5_7Qvdj98cFd+qwAtThjeqZ8f+AYDro4H_pW=@mail.gmail.com
Whole thread Raw
In response to Re: SHOW TABLES  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: SHOW TABLES
List pgsql-hackers
On Fri, Jul 16, 2010 at 1:52 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> That's for MySQL. I come from a DB2 background, and when I started using
> psql years ago, I often typed "LIST TABLES" without thinking much about it.
> Not SHOW TABLES, but LIST TABLES.
>
> I bet Oracle users coming to PostgreSQL will try "DESC". Not SHOW TABLES. As
> Simon listed, every DBMS out there has a different syntax for this.
>
> I have nothing against SHOW TABLES (it might cause conflicts in grammar
> though), but if we're going to cater to people migrating from MySQL, I feel
> we should cater to people migrating from other products too. But surely
> we're not going to implement 10 different syntaxes for the same thing! We
> could, however, give a hint in the syntax error in all those cases. That way
> we're not on the hook to maintain them forever, and we will be doing people
> a favor by introducing them to the backslash commands or information schema,
> which are more powerful.

One advantage of using LIST is that LIST doesn't already mean
something else, which would simplify the grammar handling.

LIST [SYSTEM | ALL] <any-object-type-in-plural-form>
DESCRIBE <name-of-table>

Why must the backslash commands be more powerful than any alternative
we might come up with?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Next
From: Stephen Frost
Date:
Subject: Re: SHOW TABLES