Re: BUG #13966: Documentation. 'Select' description

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: iurii(dot)i(dot)popov(at)gmail(dot)com, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13966: Documentation. 'Select' description
Date: 2016-02-18 16:44:43
Message-ID: 20160218164443.GA950565@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

David G. Johnston wrote:
> On Wed, Feb 17, 2016 at 8:03 AM, <iurii(dot)i(dot)popov(at)gmail(dot)com> wrote:

> > There is the description mismatch at documentation.
> >
> > 1. http://www.postgresql.org/docs/9.5/static/sql-select.html (SELECT)
> >
> > Each subquery can be a SELECT, TABLE, VALUES, INSERT, UPDATE or DELETE
> > statement.
> >
> > 2. http://www.postgresql.org/docs/9.5/static/queries-with.html (7.8. WITH
> > Queries (Common Table Expressions))
> >
> > Each auxiliary statement in a WITH clause can be a SELECT, INSERT, UPDATE,
> > or DELETE;
> >
> > Where is TABLE and VALUES?
>
>
> While being thorough is admirable the SELECT documentation you reference
> is official (and thus complete) command reference. The WITH section
> referenced is more descriptive in nature and doesn't have to specify/repeat
> knowledge provided elsewhere.

I'm not sure I agree with your rationale. Listing some keywords but not
all seems confusing -- it's easy to get the impression that the list is
exhaustive. I wonder if we can say something like "any of the SELECT
variants", instead of just SELECT. On the other hand, WITH itself is
sometimes seen as one of the SELECT variants (in fact if you do "man
WITH" you get the SELECT page, just like you do if you do "man TABLE" --
though curiously enough "man VALUES" is a different page), so that might
misled people into thinking that you can put one WITH clause inside
another. It seems easier to just add TABLE and VALUES to the list.

BTW I think we should add generate_series() to the SEE ALSO section of
the VALUES manpage.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-02-18 16:48:51 Re: BUG #13973: Constants resolved in then/else clauses
Previous Message Alvaro Herrera 2016-02-18 16:32:58 Re: aparent bug with pgAdmin version 1.22.1 connected to pg 9.5: SQL Pane view of SEQUENCE object