Re: SHOW TABLES

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, jd(at)commandprompt(dot)com, Simon Riggs <simon(at)2ndQuadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SHOW TABLES
Date: 2010-07-15 19:52:24
Message-ID: 4C3F66F8.8060307@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> I assume SHOW TABLES would only be useful for interactive terminal
> sesssions, not for application code (which should use
> information_schema), so what non-psql interactive terminal programs are
> there?
>
>

I think your assumption is questionable.

Plenty of people use MySQL's "SHOW TABLES" in non-interactive settings
(for good or ill). That's why any suggestion that we should return
anything other than a resultset seems like a really terrible idea to me.

This could presumably be implemented by creating a view to return the
required information and then making "SHOW TABLES" an alias for "select
* from viewname".

FYI, MS-SQL does this stuff with some stored procedures. I regularly use
sp_columns to fiind out what I'm really being asked to interact with.
See <http://msdn.microsoft.com/en-us/library/ms182764.aspx>

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2010-07-15 20:00:58 Re: bg worker: overview
Previous Message Jaime Casanova 2010-07-15 19:51:10 Re: bg worker: overview