Thread: reindex database

reindex database

From
"Sabin Coanda"
Date:
Hi,

It would be so nice to use REINDEX DATABASE command without name, for the 
current database.
Now the command is useless when a database schema script refers just itself, 
and the database name is not establish. I have to use REINDEX TABLE name 
instead searching all the database tables.

What is your opinion ?

Regards,
Sabin 




Re: reindex database

From
Achilleas Mantzios
Date:
Στις Τετάρτη 14 Μάρτιος 2007 14:44, ο/η Sabin Coanda έγραψε:
> Hi,
>
> It would be so nice to use REINDEX DATABASE command without name, for the
> current database.
> Now the command is useless when a database schema script refers just
> itself, and the database name is not establish. I have to use REINDEX TABLE
> name instead searching all the database tables.
>
> What is your opinion ?

<path to your db sources>/contrib/reindexdb/reindexdb -a
reindexes everything.

Also your script would do a

#!/bin/csh
set mydb=`psql -q -t -c "SELECT current_database()" | tr -d " \n"`
<path to your db sources>/contrib/reindexdb/reindexdb -d $mydb

>
> Regards,
> Sabin
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

--
Achilleas Mantzios