public inbox for [email protected]
help / color / mirror / Atom feedpsql's \h MOVE
4+ messages / 4 participants
[nested] [flat]
* psql's \h MOVE
@ 2011-04-01 15:17 Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Alvaro Herrera @ 2011-04-01 15:17 UTC (permalink / raw)
To: pgsql-docs
I just noticed that \h MOVE is particularly unhelpful:
alvherre=# \h move
Command: MOVE
Description: position a cursor
Syntax:
MOVE [ direction { FROM | IN } ] cursorname
The problem is that it doesn't specify what "direction" is. The doc
text tells you to look into FETCH for details, but in \h you have to
guess.
We could fix this by including a note about fetch in the <synopsis>,
so that it'd look like this:
alvherre=# \h move
Command: MOVE
Description: position a cursor
Syntax:
MOVE [ direction [ FROM | IN ] ] cursor_name
See FETCH for details on direction
This, of course, also appears in the HTML output.
This requires this simple patch:
--- a/doc/src/sgml/ref/move.sgml
+++ b/doc/src/sgml/ref/move.sgml
@@ -27,6 +27,8 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
MOVE [ <replaceable class="PARAMETER">direction</replaceable> [ FROM | IN ] ] <replaceable class="PARAMETER">cursor_name</replaceable>
+
+<phrase>See <command>FETCH</command> for details on <replaceable class="PARAMETER">direction</replaceable>.</phrase>
</synopsis>
</refsynopsisdiv>
Would anybody object to doing things this way?
The alternative I see is to expand the "direction" in the MOVE synopsis,
but it is repetitive and would require more maintenance should we ever
decide to change the possible directions.
--
Álvaro Herrera <[email protected]>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql's \h MOVE
@ 2011-04-02 16:53 Tom Lane <[email protected]>
parent: Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2011-04-02 16:53 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: pgsql-docs
Alvaro Herrera <[email protected]> writes:
> I just noticed that \h MOVE is particularly unhelpful:
> alvherre=# \h move
> Command: MOVE
> Description: position a cursor
> Syntax:
> MOVE [ direction { FROM | IN } ] cursorname
> The problem is that it doesn't specify what "direction" is. The doc
> text tells you to look into FETCH for details, but in \h you have to
> guess.
> We could fix this by including a note about fetch in the <synopsis>,
> so that it'd look like this:
> alvherre=# \h move
> Command: MOVE
> Description: position a cursor
> Syntax:
> MOVE [ direction [ FROM | IN ] ] cursor_name
> See FETCH for details on direction
-1 ... if this annoys you, just duplicate the definition of direction
from FETCH.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql's \h MOVE
@ 2011-04-04 00:37 Robert Haas <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Haas @ 2011-04-04 00:37 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; pgsql-docs
On Sat, Apr 2, 2011 at 12:53 PM, Tom Lane <[email protected]> wrote:
> Alvaro Herrera <[email protected]> writes:
>> I just noticed that \h MOVE is particularly unhelpful:
>> alvherre=# \h move
>> Command: MOVE
>> Description: position a cursor
>> Syntax:
>> MOVE [ direction { FROM | IN } ] cursorname
>
>> The problem is that it doesn't specify what "direction" is. The doc
>> text tells you to look into FETCH for details, but in \h you have to
>> guess.
>
>> We could fix this by including a note about fetch in the <synopsis>,
>> so that it'd look like this:
>
>> alvherre=# \h move
>> Command: MOVE
>> Description: position a cursor
>> Syntax:
>> MOVE [ direction [ FROM | IN ] ] cursor_name
>
>> See FETCH for details on direction
>
> -1 ... if this annoys you, just duplicate the definition of direction
> from FETCH.
+1 for duplicating the definition.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql's \h MOVE
@ 2011-04-04 16:11 Alvaro Herrera <[email protected]>
parent: Robert Haas <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2011-04-04 16:11 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-docs
Excerpts from Robert Haas's message of dom abr 03 20:37:39 -0400 2011:
> On Sat, Apr 2, 2011 at 12:53 PM, Tom Lane <[email protected]> wrote:
> > Alvaro Herrera <[email protected]> writes:
> >> I just noticed that \h MOVE is particularly unhelpful:
> >> alvherre=# \h move
> >> Command: MOVE
> >> Description: position a cursor
> >> Syntax:
> >> MOVE [ direction { FROM | IN } ] cursorname
> >
> >> The problem is that it doesn't specify what "direction" is. The doc
> >> text tells you to look into FETCH for details, but in \h you have to
> >> guess.
> > -1 ... if this annoys you, just duplicate the definition of direction
> > from FETCH.
>
> +1 for duplicating the definition.
Done that way.
(I'd like to have something like \h column_constraint for common stuff
in ALTER TABLE and CREATE TABLE, but that'll have to wait.)
--
Álvaro Herrera <[email protected]>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-04-04 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01 15:17 psql's \h MOVE Alvaro Herrera <[email protected]>
2011-04-02 16:53 ` Tom Lane <[email protected]>
2011-04-04 00:37 ` Robert Haas <[email protected]>
2011-04-04 16:11 ` Alvaro Herrera <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox