Thread: REINDEX syntax?

REINDEX syntax?

From
Jean-Christian Imbeault
Date:
I am trying to reindex a database but it seems I'm getting the steps
wrong. According to the docs I have I need to shutdown the postmaster,
start a backend and issue the reindex command on the DB I want to
reindex. But I get an error telling me no DB is open:

[postgres@localhost pgsql]$ postgres -D /usr/local/pgsql/data -O -P TAL
LOG:  database system was shut down at 2003-03-03 19:15:04 JST
LOG:  checkpoint record is at 0/9630738
LOG:  redo record is at 0/9630738; undo record is at 0/0; shutdown TRUE
LOG:  next transaction id: 818752; next oid: 436991
LOG:  database system is ready

POSTGRES backend interactive interface
$Revision: 1.307.2.1 $ $Date: 2003/01/01 21:57:18 $

backend> Reindex database TAL force;
ERROR:  REINDEX DATABASE: Can be executed only on the currently open

Has something changed for 7.3.2?

Thanks,

Jc


Re: REINDEX syntax?

From
Tom Lane
Date:
Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:
> [postgres@localhost pgsql]$ postgres -D /usr/local/pgsql/data -O -P TAL
> backend> Reindex database TAL force;
> ERROR:  REINDEX DATABASE: Can be executed only on the currently open

I think you need
    Reindex database "TAL" force;

            regards, tom lane

Re: REINDEX syntax?

From
Jean-Christian Imbeault
Date:
Tom Lane wrote:

 >I think you need
 >    Reindex database "TAL" force;

You're right. Could that be added to the documentation? I didn't find
any mention that quotes where needed at:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-reindex.html

Thanks!

Jc



Re: REINDEX syntax?

From
"scott.marlowe"
Date:
On Tue, 4 Mar 2003, Jean-Christian Imbeault wrote:

> Tom Lane wrote:
>
>  >I think you need
>  >    Reindex database "TAL" force;
>
> You're right. Could that be added to the documentation? I didn't find
> any mention that quotes where needed at:
>
> http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=sql-reindex.html

That's because that's not a reindexing issue.  It's a capitalization
issue.  Postgresql folds to lower case automatically.  That is documented,
but much earlier in the documentation.

However, it's not covered in the reference documentation.  Should such
things have a section in the reference manual?  I.e. should I be able to
just read the reference docs and know this?  I would think the reference
manual should have a section on SQL compliance / differences and things
like this.  Not in the conversational tone of the User's Manual but in a
more technical documentation type format.

But how would that be organized?  What would go in it?