Re: BUG #14135: SQL command "analyse" is undocumented

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "ville(at)torhonen(dot)fi" <ville(at)torhonen(dot)fi>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14135: SQL command "analyse" is undocumented
Date: 2016-05-12 14:05:42
Message-ID: CAKFQuwZayFF3Gk+B6c=eWyi4cn=oRM4mqOOpmAi=7AZsv9go6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thursday, May 12, 2016, <ville(at)torhonen(dot)fi> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14135
> Logged by: Ville Törhönen
> Email address: ville(at)torhonen(dot)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=# \h analyze
> Command: ANALYZE
> Description: collect statistics about a database
> Syntax:
> ANALYZE [ VERBOSE ] [ table_name [ ( column_name [, ...] ) ] ]
>
> postgres=# \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 Key
> 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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-05-12 23:47:54 Re: BUG #14135: SQL command "analyse" is undocumented
Previous Message ville 2016-05-12 08:24:09 BUG #14135: SQL command "analyse" is undocumented