agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
Q: documentation bug ?
6+ messages / 4 participants
[nested] [flat]

* Q: documentation bug ?
@ 2016-02-04 10:53  Karsten Hilbert <Karsten.Hilbert@gmx.net>
  0 siblings, 3 replies; 6+ messages in thread

From: Karsten Hilbert @ 2016-02-04 10:53 UTC (permalink / raw)
  To: pgsql-sql

Hello all,

the online documentation for REINDEX

	http://www.postgresql.org/docs/9.5/static/sql-reindex.html

talks about VERBOSE

	Synopsis

	REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name

	[...]

	VERBOSE

	    Prints a progress report as each index is reindexed.

but

	root@hermes:~/bin# psql -d gnumed_v21 -U gm-dbo
	Ausgabeformat ist „wrapped“.
	Erweiterte Anzeige ist an.
	psql (9.5.0)
	Geben Sie „help“ für Hilfe ein.

	gnumed_v21=> select version();
	-[ RECORD 1 ]-------------------------------------------------------------------------------------------
	version | PostgreSQL 9.5.0 on i686-pc-linux-gnu, compiled by gcc (Debian 5.3.1-5) 5.3.1 20160101, 32-bit

	gnumed_v21=> reindex<TAB>
	DATABASE  INDEX     SCHEMA    SYSTEM    TABLE

	gnumed_v21=> reindex verbose database 'gnumed_v21';
	ERROR:  syntax error at or near "verbose"
	ZEILE 1: reindex verbose database 'gnumed_v21';
	                 ^
	gnumed_v21=>

Does this constitute a bug in the documentation or in the Debian version of PG ?

Thanks,
Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Q: documentation bug ?
@ 2016-02-04 10:56  Karsten Hilbert <Karsten.Hilbert@gmx.net>
  parent: Karsten Hilbert <Karsten.Hilbert@gmx.net>
  2 siblings, 0 replies; 6+ messages in thread

From: Karsten Hilbert @ 2016-02-04 10:56 UTC (permalink / raw)
  To: pgsql-sql

Bounced to -general, sorry for the noise.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] Q: documentation bug ?
@ 2016-02-04 11:00  Vik Fearing <vik@2ndquadrant.fr>
  parent: Karsten Hilbert <Karsten.Hilbert@gmx.net>
  2 siblings, 1 reply; 6+ messages in thread

From: Vik Fearing @ 2016-02-04 11:00 UTC (permalink / raw)
  To: Karsten Hilbert <Karsten.Hilbert@gmx.net>; pgsql-sql

On 02/04/2016 11:53 AM, Karsten Hilbert wrote:
> Hello all,
> 
> the online documentation for REINDEX
> 
> 	http://www.postgresql.org/docs/9.5/static/sql-reindex.html
> 
> talks about VERBOSE
> 
> 	Synopsis
> 
> 	REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name
> 
> 	[...]
> 
> 	VERBOSE
> 
> 	    Prints a progress report as each index is reindexed.
> 
> but
> 
> 	gnumed_v21=> reindex verbose database 'gnumed_v21';
> 	ERROR:  syntax error at or near "verbose"
> 	ZEILE 1: reindex verbose database 'gnumed_v21';
> 
> Does this constitute a bug in the documentation or in the Debian version of PG ?

Neither.  It's a little bit obscure because {} and [] mean special
things, but () doesn't.  The syntax is therefore:

    REINDEX (VERBOSE) DATABASE gnumed_v21;
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] Q: documentation bug ?
@ 2016-02-04 11:05  Karsten Hilbert <Karsten.Hilbert@gmx.net>
  parent: Vik Fearing <vik@2ndquadrant.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: Karsten Hilbert @ 2016-02-04 11:05 UTC (permalink / raw)
  To: pgsql-sql; +Cc: pgsql-general <pgsql-general@postgresql.org>

On Thu, Feb 04, 2016 at 12:00:45PM +0100, Vik Fearing wrote:

>> 	REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name
...
>> Does this constitute a bug in the documentation or in the Debian version of PG ?
> 
> Neither.  It's a little bit obscure because {} and [] mean special
> things, but () doesn't.

Eagle-eyed !

>  The syntax is therefore:
> 
>     REINDEX (VERBOSE) DATABASE gnumed_v21;

Thank you !  :-)

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [GENERAL] Q: documentation bug ?
@ 2016-02-04 16:01  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Karsten Hilbert <Karsten.Hilbert@gmx.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2016-02-04 16:01 UTC (permalink / raw)
  To: Karsten Hilbert <Karsten.Hilbert@gmx.net>; +Cc: pgsql-sql@postgresql.org, pgsql-general <pgsql-general@postgresql.org>

Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> On Thu, Feb 04, 2016 at 12:00:45PM +0100, Vik Fearing wrote:
>>> REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name

>>> Does this constitute a bug in the documentation or in the Debian version of PG ?

>> Neither.  It's a little bit obscure because {} and [] mean special
>> things, but () doesn't.

> Eagle-eyed !

Seems to me the syntax BNF here is bringing the problem on itself by using
{ ... } when in fact only one alternative is available.  I don't find
{ FOO | BAR } especially hard to read, but { FOO } is confusing because
you expect the {}'s to mean something and they really do not.

I'd be inclined to reduce this to

REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name

We can put back the extra decoration when and if a second option arrives.

			regards, tom lane


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [SQL] Q: documentation bug ?
@ 2016-02-04 17:56  Fabrízio de Royes Mello <fabrizio@timbira.com.br>
  parent: Karsten Hilbert <Karsten.Hilbert@gmx.net>
  2 siblings, 0 replies; 6+ messages in thread

From: Fabrízio de Royes Mello @ 2016-02-04 17:56 UTC (permalink / raw)
  To: pgsql-general@postgresql.org

On 04-02-2016 08:53, Karsten Hilbert wrote:
> Hello all,
> 
> the online documentation for REINDEX
> 
> 	http://www.postgresql.org/docs/9.5/static/sql-reindex.html
> 
> talks about VERBOSE
> 
> 	Synopsis
> 
> 	REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name
> 
> 	[...]
> 
> 	VERBOSE
> 
> 	    Prints a progress report as each index is reindexed.
> 
> but
> 
> 	root@hermes:~/bin# psql -d gnumed_v21 -U gm-dbo
> 	Ausgabeformat ist „wrapped“.
> 	Erweiterte Anzeige ist an.
> 	psql (9.5.0)
> 	Geben Sie „help“ für Hilfe ein.
> 
> 	gnumed_v21=> select version();
> 	-[ RECORD 1 ]-------------------------------------------------------------------------------------------
> 	version | PostgreSQL 9.5.0 on i686-pc-linux-gnu, compiled by gcc (Debian 5.3.1-5) 5.3.1 20160101, 32-bit
> 
> 	gnumed_v21=> reindex<TAB>
> 	DATABASE  INDEX     SCHEMA    SYSTEM    TABLE
> 
> 	gnumed_v21=> reindex verbose database 'gnumed_v21';
> 	ERROR:  syntax error at or near "verbose"
> 	ZEILE 1: reindex verbose database 'gnumed_v21';
> 	                 ^
> 	gnumed_v21=>
> 
> Does this constitute a bug in the documentation or in the Debian version of PG ?
> 

You forgot to add the "(" and ")" around the "VERBOSE" statement
acoording the syntax.

Try this:

REINDEX (VERBOSE) DATABASE gnumed_v21;

Regards,

-- 
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Attachments:

  [application/pgp-signature] signature.asc (472B, ../../56B390E6.3000007@timbira.com.br/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2016-02-04 17:56 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04 10:53 Q: documentation bug ? Karsten Hilbert <Karsten.Hilbert@gmx.net>
2016-02-04 10:56 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2016-02-04 11:00 ` Vik Fearing <vik@2ndquadrant.fr>
2016-02-04 11:05   ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2016-02-04 16:01     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-02-04 17:56 ` Fabrízio de Royes Mello <fabrizio@timbira.com.br>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox