Re: BUG #14135: SQL command "analyse" is undocumented - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #14135: SQL command "analyse" is undocumented
Date
Msg-id CAKFQuwZayFF3Gk+B6c=eWyi4cn=oRM4mqOOpmAi=7AZsv9go6w@mail.gmail.com
Whole thread Raw
In response to BUG #14135: SQL command "analyse" is undocumented  (ville@torhonen.fi)
Responses Re: BUG #14135: SQL command "analyse" is undocumented  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
On Thursday, May 12, 2016, <ville@torhonen.fi> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14135
> Logged by:          Ville T=C3=B6rh=C3=B6nen
> Email address:      ville@torhonen.fi <javascript:;>
> PostgreSQL version: 9.5.2
> Operating system:   CentOS 6.5
> Description:
>
> Hello,
>
> On PostgreSQL 9.5.2 SQL commands "analyze" and "analyse" run exactly the
> same thing. However, the "analyse" command is completely undocumented.
>
> postgres=3D# \h analyze
> Command:     ANALYZE
> Description: collect statistics about a database
> Syntax:
> ANALYZE [ VERBOSE ] [ table_name [ ( column_name [, ...] ) ] ]
>
> postgres=3D# \h analyse
> No help available for "analyse".
> Try \h with no arguments to see available help.
>
> Tab completion does not acknowledge "analyse" command. Product
> documentation
> [1] states that the command "analyse" is reserved, but "Appendix C: SQL K=
ey
> Words" is the only page in the whole documentation that mentions the word
> "analyse".
>
> Tested with the following PostgreSQL RPM packages from PostgreSQL yum
> repository (yum.postgresql.org):
>
> postgresql95-libs-9.5.2-1PGDG.rhel6.x86_64
> postgresql95-server-9.5.2-1PGDG.rhel6.x86_64
> postgresql95-9.5.2-1PGDG.rhel6.x86_64
> postgresql95-contrib-9.5.2-1PGDG.rhel6.x86_64
> postgresql95-devel-9.5.2-1PGDG.rhel6.x86_64
>
>
The alias should be documented but I would not think it should be part of
tab completion.

I'd probably add a note to the analyze areas and, for \h analyse, redirect
to analyze.

I think altering the syntax would just be noise for little gain.  My goal
is if someone sees or types analyse they at least know it's intended
behavior and indeed an alias.

Not at a terminal now but hopefully the analyze option to vacuum and
explain behave similarly...

David J.

pgsql-bugs by date:

Previous
From: ville@torhonen.fi
Date:
Subject: BUG #14135: SQL command "analyse" is undocumented
Next
From: Michael Paquier
Date:
Subject: Re: BUG #14135: SQL command "analyse" is undocumented