pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14135: SQL command "analyse" is undocumented
7+ messages / 6 participants
[nested] [flat]
* BUG #14135: SQL command "analyse" is undocumented
@ 2016-05-12 08:24 ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: ville@torhonen.fi @ 2016-05-12 08:24 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14135
Logged by: Ville Törhönen
Email address: ville@torhonen.fi
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
Regards,
Ville
[1] http://www.postgresql.org/docs/9.5/static/sql-keywords-appendix.html
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
@ 2016-05-12 14:05 ` David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: David G. Johnston @ 2016-05-12 14:05 UTC (permalink / raw)
To: ville@torhonen.fi <ville@torhonen.fi>; +Cc: 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örhönen
> 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=# \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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
@ 2016-05-12 23:47 ` Michael Paquier <michael.paquier@gmail.com>
2016-05-13 00:15 ` Re: BUG #14135: SQL command "analyse" is undocumented Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2016-05-12 23:47 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: ville@torhonen.fi <ville@torhonen.fi>; pgsql-bugs
On Thu, May 12, 2016 at 11:05 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> 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...
Some history shows up that:
commit: ebe0b236909732c75d665c73363bd4ac7a7aa138
author: Bruce Momjian <bruce@momjian.us>
date: Wed, 8 Nov 2000 21:28:06 +0000
Add ANALYSE spelling of ANALYZE for vacuum.
I am not sure that it is worth complicating the docs for the British
spelling of this word.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
@ 2016-05-13 00:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-05-13 00:23 ` Re: BUG #14135: SQL command "analyse" is undocumented Joe Conway <mail@joeconway.com>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2016-05-13 00:15 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; ville@torhonen.fi <ville@torhonen.fi>; pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> I am not sure that it is worth complicating the docs for the British
> spelling of this word.
I agree. If someone were to hold my feet to the fire about that,
I'd vote for taking out the ANALYSE spelling rather than documenting
it. But I'd rather leave it alone, since no doubt some of the British
contingent are used to being able to spell it that way, even if the
docs don't say that they can.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
2016-05-13 00:15 ` Re: BUG #14135: SQL command "analyse" is undocumented Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-05-13 00:23 ` Joe Conway <mail@joeconway.com>
2016-05-13 01:49 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Joe Conway @ 2016-05-13 00:23 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; ville@torhonen.fi <ville@torhonen.fi>; pgsql-bugs
On 05/12/2016 05:15 PM, Tom Lane wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> I am not sure that it is worth complicating the docs for the British
>> spelling of this word.
>
> I agree. If someone were to hold my feet to the fire about that,
> I'd vote for taking out the ANALYSE spelling rather than documenting
> it. But I'd rather leave it alone, since no doubt some of the British
> contingent are used to being able to spell it that way, even if the
> docs don't say that they can.
I was involved in a project whereby the client had written an app to
filter/control what could be executed by their developers (via a web
interface), and since ANALYSE was undocumented they missed it. I was
aware of it and pointed it out during an audit of their app.
Personally I would vote to either document it or rip it out, but I don't
think the status quo is good.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:
signature.asc (application/pgp-signature, 835B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
2016-05-13 00:15 ` Re: BUG #14135: SQL command "analyse" is undocumented Tom Lane <tgl@sss.pgh.pa.us>
2016-05-13 00:23 ` Re: BUG #14135: SQL command "analyse" is undocumented Joe Conway <mail@joeconway.com>
@ 2016-05-13 01:49 ` Michael Paquier <michael.paquier@gmail.com>
2016-05-13 05:35 ` Re: BUG #14135: SQL command "analyse" is undocumented Thomas Munro <thomas.munro@enterprisedb.com>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2016-05-13 01:49 UTC (permalink / raw)
To: Joe Conway <mail@joeconway.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; David G. Johnston <david.g.johnston@gmail.com>; ville@torhonen.fi <ville@torhonen.fi>; pgsql-bugs
On Fri, May 13, 2016 at 9:23 AM, Joe Conway <mail@joeconway.com> wrote:
> On 05/12/2016 05:15 PM, Tom Lane wrote:
>> I agree. If someone were to hold my feet to the fire about that,
>> I'd vote for taking out the ANALYSE spelling rather than documenting
>> it. But I'd rather leave it alone, since no doubt some of the British
>> contingent are used to being able to spell it that way, even if the
>> docs don't say that they can.
>
> I was involved in a project whereby the client had written an app to
> filter/control what could be executed by their developers (via a web
> interface), and since ANALYSE was undocumented they missed it. I was
> aware of it and pointed it out during an audit of their app.
>
> Personally I would vote to either document it or rip it out, but I don't
> think the status quo is good.
If the choice is only between those two, I'd vote for nuking it and
simplify the code, but honestly the current statu-quo has been running
for 16 years and there are not many complains about it, so as a third
choice the current situation is fine IMO. And it does not represent an
extra maintenance load.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: BUG #14135: SQL command "analyse" is undocumented
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` Re: BUG #14135: SQL command "analyse" is undocumented David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
2016-05-13 00:15 ` Re: BUG #14135: SQL command "analyse" is undocumented Tom Lane <tgl@sss.pgh.pa.us>
2016-05-13 00:23 ` Re: BUG #14135: SQL command "analyse" is undocumented Joe Conway <mail@joeconway.com>
2016-05-13 01:49 ` Re: BUG #14135: SQL command "analyse" is undocumented Michael Paquier <michael.paquier@gmail.com>
@ 2016-05-13 05:35 ` Thomas Munro <thomas.munro@enterprisedb.com>
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Munro @ 2016-05-13 05:35 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Joe Conway <mail@joeconway.com>; Tom Lane <tgl@sss.pgh.pa.us>; David G. Johnston <david.g.johnston@gmail.com>; ville@torhonen.fi <ville@torhonen.fi>; pgsql-bugs
On Fri, May 13, 2016 at 1:49 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, May 13, 2016 at 9:23 AM, Joe Conway <mail@joeconway.com> wrote:
>> On 05/12/2016 05:15 PM, Tom Lane wrote:
>>> I agree. If someone were to hold my feet to the fire about that,
>>> I'd vote for taking out the ANALYSE spelling rather than documenting
>>> it. But I'd rather leave it alone, since no doubt some of the British
>>> contingent are used to being able to spell it that way, even if the
>>> docs don't say that they can.
>>
>> I was involved in a project whereby the client had written an app to
>> filter/control what could be executed by their developers (via a web
>> interface), and since ANALYSE was undocumented they missed it. I was
>> aware of it and pointed it out during an audit of their app.
>>
>> Personally I would vote to either document it or rip it out, but I don't
>> think the status quo is good.
>
> If the choice is only between those two, I'd vote for nuking it and
> simplify the code, but honestly the current statu-quo has been running
> for 16 years and there are not many complains about it, so as a third
> choice the current situation is fine IMO. And it does not represent an
> extra maintenance load.
It's strange that this one keyword has been singled out for
transatlantic treatment, and it's good news that it's not documented.
We don't accept CATALOGUE, SERIALISABLE, MATERIALISED, AUTHORISATION
etc, and those like me who usually use those spellings in prose are
doing just fine with this exotic Californian software. +1 for nuking
it.
--
Thomas Munro
http://www.enterprisedb.com
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2016-05-13 05:35 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 08:24 BUG #14135: SQL command "analyse" is undocumented ville@torhonen.fi
2016-05-12 14:05 ` David G. Johnston <david.g.johnston@gmail.com>
2016-05-12 23:47 ` Michael Paquier <michael.paquier@gmail.com>
2016-05-13 00:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-05-13 00:23 ` Joe Conway <mail@joeconway.com>
2016-05-13 01:49 ` Michael Paquier <michael.paquier@gmail.com>
2016-05-13 05:35 ` Thomas Munro <thomas.munro@enterprisedb.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox