[postgres@sys3 bin]$ ./postgres -D /usr/local/pgsql/data -O -P mydb
LOG: database system was shut down at 2009-11-11 13:44:47 IST
LOG: checkpoint record is at 0/AE63A0
LOG: redo record is at 0/AE63A0; undo record is at 0/0; shutdown TRUE
LOG: next transaction id: 2254; next oid: 17058
LOG: database system is ready
POSTGRES backend interactive interface
$Revision: 1.307.2.1 $ $Date: 2003/01/01 21:57:18 $
backend> Reindex Database mydb
NOTICE: relation 16416 was reindexed
NOTICE: relation 1255 was reindexed
NOTICE: relation 16410 was reindexed
NOTICE: relation 1247 was reindexed
NOTICE: relation 1249 was reindexed
NOTICE: relation 1259 was reindexed
NOTICE: relation 16388 was reindexed
NOTICE: relation 16390 was reindexed
NOTICE: relation 16392 was reindexed
NOTICE: relation 16394 was reindexed
NOTICE: relation 16396 was reindexed
NOTICE: relation 16398 was reindexed
NOTICE: relation 16400 was reindexed
NOTICE: relation 16402 was reindexed
NOTICE: relation 16404 was reindexed
NOTICE: relation 16406 was reindexed
NOTICE: relation 16412 was reindexed
NOTICE: relation 16418 was reindexed
NOTICE: relation 16594 was reindexed
NOTICE: relation 16596 was reindexed
NOTICE: relation 16598 was reindexed
NOTICE: relation 16384 was reindexed
NOTICE: relation 16386 was reindexed
NOTICE: relation 16408 was reindexed
backend> LOG: shutting down
LOG: database system is shut down
In the above activity there is an interactive command "Reindex Database", I can't call this command in to a shell script. I want to do this activity without my interaction. Please suggest me what to do...