Re: SHOW TABLES

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SHOW TABLES
Date: 2010-07-15 17:02:49
Message-ID: AANLkTinRxn9MPEKQiWjjHud-b4cUeaorcxoFyHhfLWNC@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 15, 2010 at 18:59, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Thu, 2010-07-15 at 18:43 +0200, Magnus Hagander wrote:
>> On Thu, Jul 15, 2010 at 18:35, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> > On Thu, 2010-07-15 at 17:38 +0200, Magnus Hagander wrote:
>> >
>> >> Is there an actual common use-case for having these commands available
>> >> for *non-psql* interfaces?
>> >
>> > There are many interfaces out there and people writing new ones
>> > everyday. We just wrote an interface for Android, for example.
>> >
>> > It is arguably *more* important to do this from non-psql interfaces.
>> >
>> > There should be one command to "display a list of tables" and it needs
>> > to be easily guessable for those who have forgotten.
>>
>> The downside is that you are then limited to what can be returned as a
>> resultset. A "\d table" in psql returns a hell of a lot more than
>> that. So do we keep two separate formats for this? Or do we remove the
>> current, useful, output format in favor of a much worse formt just to
>> support more clients?
>
> I imagined that we would do something similar to EXPLAIN, a set of text
> rows returned.

Wouldn't that be useless for the case when an app wants to use it? An
app will require it to be structured somehow.

There's a reason we made EXPLAIN output data structured now. But I
guess you could define an XML/JSON schema and return it in that...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-07-15 17:04:19 Re: Per-column collation, proof of concept
Previous Message Simon Riggs 2010-07-15 16:59:34 Re: SHOW TABLES