Re: SHOW TABLES

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "jd(at)commandprompt(dot)com" <jd(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Rob Wultsch <wultsch(at)gmail(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Bruce Momjian <bruce(at)momjian(dot)us>, Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: SHOW TABLES
Date: 2010-07-18 21:16:05
Message-ID: 20100718211605.GB21875@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin,

* Kevin Grittner (Kevin(dot)Grittner(at)wicourts(dot)gov) wrote:
> I can't picture anything which could be done with views which would
> allow me to issue one statement and see everything of interest about
> a table (etc.). You know: tablespace, owner, permissions, columns,
> primary key, foreign keys, check constraints, exclusion constraints,
> ancestor tables, child tables, and whatever interesting features I
> missed or we later add.

You think that the users of the libpq() interface (or even the protocol
itself) are going to handle getting \dt-type output back somehow..? As
what, a single-column result of type text? And then they'll use
non-fixed-width fonts, undoubtably, which means the results will end up
looking rather ugly, even if we put in the effort to format the results.

I'm becoming more and more inclined to just address this with
newsysviews and encouraging use of the existing TABLE top-level command
for people who have issue with 'SELECT *'.

> Other products allow that to be generated
> server-side, so that it is available to any and all clients. I
> think we should join the crowd in this respect.

I could see some things being done this way, but the entire \dt output
for a given table strikes me as stretching it pretty far.. And only
doing it half-way doesn't strike me as a very good idea.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Singer 2010-07-19 02:00:39 Re: Patch: psql \whoami option
Previous Message Andres Freund 2010-07-18 19:44:46 Re: SHOW TABLES