Re: SHOW TABLES - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject Re: SHOW TABLES
Date
Msg-id 4C4359A1.5010507@kaltenbrunner.cc
Whole thread Raw
In response to Re: SHOW TABLES  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On 07/18/2010 09:00 PM, Kevin Grittner wrote:
> Dimitri Fontaine<dfontaine@hi-media.com>  wrote:
>
>> So what we'd need first is a series of named queries, which I
>> think psql provides for.
>
> Any solution which only works within psql isn't a solution for a
> large part of the problem space people are trying to address.  One
> important goal is that if someone spends a day to whip up a GUI
> query tool (as I did when I first started working in Java), it's
> easy to get displays like we get from the psql backslash commands
> (as it was in Sybase, which is what we were using at the time,
> through sp_help and related stored procedures).

yeah but having to call a SP is basically the same as formulating a 
query - the point really is that it is completely up to the client to 
think of a suitable representation for the information and the interface 
for the user to select data.
Just implementing something in the server that either shows "everything" 
(whatever that really is in practice) will very often not match to what 
the tool really wants. And once we are into "providing something that 
can do arbitrary stuff like filtering or output manipulation" we are 
back to where we are - issueing an SQL-query against the catalog.

>
> While the four DBAs use psql heavily, the twenty-some programmers
> and the business analysts all use various GUI tools which either tie
> in to their normal environments (for example, eclipse) or are web
> based hacks which probably didn't take much more effort than the
> above-mentioned GUI hack which I used for about ten years.
> Backslash commands do them no good whatsoever, nor will any solution
> which requires psql.
>
> It would be nice if when I display information about a table or some
> other database object, I could copy from my psql session, paste it
> into an email, and they could replicate the behavior in squirrel (or
> whatever the heck else they happen to be running).

In that case you are not really using the tool per it's primary purpose 
(ie say a webgui that provides a graphical interpretation of something) 
but you are back to merely using it as an SQL-commandline client.
I really doubt that there is any solution to the general problem as soon 
as you want filtering and related stuff - and if you only do the limited 
version people will soon come back and tell you it's not as flexible as 
was we had before (like backslash commands can do some limited 
filtering) or reimplementing SQL.


Stefan


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: SHOW TABLES
Next
From: Andres Freund
Date:
Subject: Re: SHOW TABLES