Re: SHOW TABLES - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: SHOW TABLES
Date
Msg-id 1279230402.1735.17541.camel@ebony
Whole thread Raw
In response to Re: SHOW TABLES  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, 2010-07-15 at 15:52 -0400, Andrew Dunstan wrote:
> 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> 

Sounds good.

OK, how about this:

We write a function to derive the output, which can be executed as a
function if people like that.

We then make SHOW TABLEs a synonym for SELECT * FROM show_function()

That way we get both in one go.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: SHOW TABLES
Next
From: Dimitri Fontaine
Date:
Subject: Re: SHOW TABLES