Re: psql questions: SQL, progname, copyright dates - Mailing list pgsql-hackers

From Robert Treat
Subject Re: psql questions: SQL, progname, copyright dates
Date
Msg-id 200409092331.48129.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: psql questions: SQL, progname, copyright dates  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: psql questions: SQL, progname, copyright dates
Re: psql questions: SQL, progname, copyright dates
List pgsql-hackers
On Thursday 09 September 2004 21:30, Bruce Momjian wrote:
> Tom Lane wrote:
> > Andrew Dunstan <andrew@dunslane.net> writes:
> > > ISTM one problem is we are inconsistent about it - \d  and \dt don't
> > > show system objects, but \df shows system functions. Reading TFM is a
> > > good thing, but so is consistency.
> >
> > Well, one of the subarguments here is whether we are going to change the
> > behavior of the table-related \d commands too.  If we choose a modifier
> > other than S for \df, I'd be inclined to adopt the same behavior for the
> > table commands.
> >
> > > '-' isn't a very nice choice, because \df-+ would be really confusing.
> > > If you don't like '&', then '@' and '!' seem to be at least as free as
> > > '-' ;-)
> >
> > [ shrug ]  But '-' has the correct implication that you're removing
> > something.  Those other symbols are just arbitrary.  I'd like to pick
> > something with at least some mnemonic value.
>
> One question is whether we want to suppress system functions by default
> in \df.  From my perspective, the issue is whether we would use those
> objects in normal application queries.  Clearly we would use system
> functions in application queries, so we display them.  (We might be able
> to suppress display of interally called functions if we still display
> them).  We don't refer to system tables in normal application queries so
> it makes sense we don't display them by default.

FWIW in phppgadmin we do suppress system functions by default and I can't 
recall anyone ever asking us to do otherwise.  Its actually one of the 
reasons I use phppgadmin, because when trying to work through complex 
function code, having all of the system functions is just to cumbersome.  

>
> As far as the symbol, I think we should keep letters as object
> specifiers and not use 'S' to mean system.  The idea for '&' was to say
> "and system objects", and if we go for an options to supress system
> objects, '-' seems best.  I don't imagine people using -+ very often.
>

Ugh. If I want to see the syntax of my functions, I'd be forced to use the 
\df-+ syntax, and I'd argue people spend far more time wanting to see \df+ 
output on their own functions than they ever do on system functions. 

imho the argument against \dfS is pretty weak.  Letters are not only used as 
object specifiers, they are also used for setting field separators, html 
output, switching to and from expanded output, and listing table access 
permissions, among other things.  Telling folks that the S modifier is for 
system objects mnemonic, simple, and FWIW keeps with backward compatability.

-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: APR 1.0 released
Next
From: Bruce Momjian
Date:
Subject: Re: row wise comparison broken