Re: [HACKERS] Re: [PATCHES] COMMENT ON patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Re: [PATCHES] COMMENT ON patch
Date
Msg-id Pine.GSO.4.02A.9910261318130.11161-100000@Krabba.DoCS.UU.SE
Whole thread Raw
In response to Re: [HACKERS] Re: [PATCHES] COMMENT ON patch  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
On Tue, 26 Oct 1999, Bruce Momjian wrote:

> > In related news I'd like to point out that psql's \dd command now supports
> > aggregates, functions, operators, types, relations (tables, views,
> > indices, sequences), rules, and triggers. In addition all the other \d?
> > commands (\da, \df, \dT, \do, \dtvsiS), as well as \l, have comments
> > display switchable. Attribute comments can be seen in \d in a similar
> > fashion. You can also give a comment on \lo_import which can then be seen
> > in \lo_list (=\dl). Seems like all the bases are covered.
> 
> OK, I think we need help on this.  I have added documentation in
> psqlHelp.c and comment.sgml.  You are mentioning some new psql flags
> that I don't know we had.  Can you send info on that.  psql.c and
> psql-ref.sgml are two areas that need additions based on what you said.

I implemented sort of shell variables into psql (I mentioned it in the
changelogs, but those were admittedly quite long), so you can set
variables like:
\set foo 'bar'
\echo $foo
\echo "foo is now ${foo}"
etc.

The initial motivation was that I would run out of mnemonic flags pretty
soon, so most psql state is now in a variable:
\set quiet on    (-q switch)
\set echo on     (-e switch)
\set echo_secret on (-E switch)
etc.
(In fact you don't have to set them to "on", anything works. To unset them
just write \set varname)
The cmd line switches are unaffected, but this way you can also set them
within psql. There are also a few variables representing new
functionality:
\set description on
will turn on the display of the object descriptions. There are a few
others, too.

That's just what I meant with the above. Of course one fine day very soon
I'll formally document all of this in DocBook. There is _a lot_ of new
stuff, so I might actually end up doing a lot of new documenting. You
might want to save yourself the work right now.
-Peter

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: [HACKERS] Current source from CVS won't compile.
Next
From: Fernando Schapachnik
Date:
Subject: Re: [HACKERS] Neverending query on 6.5.2 over Solaris 2.5.1