Skip site navigation (1) Skip section navigation (2)

Re: psql and output from \?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Ian Barwick <barwick(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and output from \?
Date: 2002-02-25 23:57:04
Message-ID: Pine.LNX.4.30.0202251844250.836-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Ian Barwick writes:

>   Appended is a list of relevant backslash commands, their current
>   description as produced by  \?, the respective manpage description (or
>   first part thereof) and suggested replacment for the \? description.
>   Assumption is that square brackets - as used elsewhere within the
>   \? output and the manpage documentation - imply optional parameters.

Nicely observed.  Please send in a patch.  Accurate documentation is

> psql \? new:
> \C [ TITLE ]  set table title (or unset with no arguments)

I don't think we use spaces between the brackets and the text anywhere
else in console-formatted output, so we might not want to start here.

Also, the part in the parentheses is ambiguous.  Maybe "(without
arguments: unset)".

> psql \? new:
> \d [ RELATION ] describe relation (table, view, index or sequence)

Comma before "or".

> psql \? new:
> \e [ FILENAME ]  edit the current query buffer or file with external editor

Maybe drop the "current".  (This was not introduced by you, but you might
as well do it.)

Something that's also annoyed me for a while is that the PLACEHOLDER
strings are inconsistent in whether they describe the data type or the
semantics of the argument.  I think the data type is ultimately more
useful, as the semantics come from the documentation string by definition.

So instead of \C TITLE maybe better \C STRING, and instead of \d TABLE use
\d IDENTIFIER (or maybe NAME).  The latter has two advantages:  First
you're not passing \d a table descriptor, if there was such a thing.  And
second, it informs the user that the SQL identifier quoting rules will
apply to the argument.  I guess FILENAME and DIRNAME are ok as "data
types", but all the other stuff can go, I think.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-hackers by date

Next:From: Thomas LockhartDate: 2002-02-26 01:35:48
Subject: Re: More time zones
Previous:From: Ian BarwickDate: 2002-02-25 23:13:14
Subject: psql and output from \?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group