Thread: ALL in SELECT syntax \h psql flawed?

ALL in SELECT syntax \h psql flawed?

From
Alvaro Herrera
Date:
\h select in psql says (among other things)

    [ { UNION | INTERSECT | EXCEPT [ ALL ] } select ]

I think it should read

    [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]

(the SQL reference says the same thing as psql)

--
Alvaro Herrera (<alvherre[@]atentus.com>)
"La virtud es el justo medio entre dos defectos" (Aristoteles)

Re: ALL in SELECT syntax \h psql flawed?

From
Thomas Lockhart
Date:
> \h select in psql says (among other things)
>     [ { UNION | INTERSECT | EXCEPT [ ALL ] } select ]
> I think it should read
>     [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]

I agree. Bruce ("Mr. Backslash" :) are you planning on picking this up?

                      - Thomas

Re: ALL in SELECT syntax \h psql flawed?

From
Bruce Momjian
Date:
>
> \h select in psql says (among other things)
>
>     [ { UNION | INTERSECT | EXCEPT [ ALL ] } select ]
>
> I think it should read
>
>     [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]
>
> (the SQL reference says the same thing as psql)

Good catch!  Hard to imagine how we missed seeing this mistake.  Patch
applied.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/sql.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/sql.sgml,v
retrieving revision 1.23
diff -c -r1.23 sql.sgml
*** doc/src/sgml/sql.sgml    2001/10/20 02:55:38    1.23
--- doc/src/sgml/sql.sgml    2001/10/23 16:27:30
***************
*** 861,867 ****
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">class_name</replaceable> [, ...] ] ]
      [ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
--- 861,867 ----
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT } [ ALL ] <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">class_name</replaceable> [, ...] ] ]
      [ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
Index: doc/src/sgml/ref/select.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v
retrieving revision 1.48
diff -c -r1.48 select.sgml
*** doc/src/sgml/ref/select.sgml    2001/10/20 02:55:38    1.48
--- doc/src/sgml/ref/select.sgml    2001/10/23 16:27:54
***************
*** 26,32 ****
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
      [ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
--- 26,32 ----
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT } [ ALL ] <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
      [ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
Index: doc/src/sgml/ref/select_into.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v
retrieving revision 1.13
diff -c -r1.13 select_into.sgml
*** doc/src/sgml/ref/select_into.sgml    2001/10/22 18:14:47    1.13
--- doc/src/sgml/ref/select_into.sgml    2001/10/23 16:27:54
***************
*** 29,35 ****
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT [ ALL ] } <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
      [ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable
class="PARAMETER">count</replaceable>| ALL } ] 
--- 29,35 ----
      [ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
      [ GROUP BY <replaceable class="PARAMETER">expression</replaceable> [, ...] ]
      [ HAVING <replaceable class="PARAMETER">condition</replaceable> [, ...] ]
!     [ { UNION | INTERSECT | EXCEPT } [ ALL ] <replaceable class="PARAMETER">select</replaceable> ]
      [ ORDER BY <replaceable class="PARAMETER">expression</replaceable> [ ASC | DESC | USING <replaceable
class="PARAMETER">operator</replaceable>] [, ...] ] 
      [ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
      [ LIMIT [ <replaceable class="PARAMETER">start</replaceable> , ] { <replaceable
class="PARAMETER">count</replaceable>| ALL } ] 

Re: ALL in SELECT syntax \h psql flawed?

From
Bruce Momjian
Date:
> > \h select in psql says (among other things)
> >     [ { UNION | INTERSECT | EXCEPT [ ALL ] } select ]
> > I think it should read
> >     [ { UNION | INTERSECT | EXCEPT } [ ALL ] select ]
>
> I agree. Bruce ("Mr. Backslash" :) are you planning on picking this up?

Done.  :-)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026