Re: SHOW TABLES - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: SHOW TABLES
Date
Msg-id 4C3F66F8.8060307@dunslane.net
Whole thread Raw
In response to Re: SHOW TABLES  (Bruce Momjian <bruce@momjian.us>)
Responses Re: SHOW TABLES
Re: SHOW TABLES
Re: SHOW TABLES
List 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


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: bg worker: overview
Next
From: Markus Wanner
Date:
Subject: Re: bg worker: overview