summaryrefslogtreecommitdiff
path: root/contrib/reindexdb
diff options
context:
space:
mode:
authorBruce Momjian2002-10-18 18:41:22 +0000
committerBruce Momjian2002-10-18 18:41:22 +0000
commitaa4c702eac936964649f905741b4a99f4b489200 (patch)
tree517d3c28aa3d28eb95b19c8676c940b5cefe2031 /contrib/reindexdb
parentfb9bc342fffc157d6ca4b635aeeaccb3c1370b91 (diff)
Update /contrib for "autocommit TO 'on'".
Create objects in public schema. Make spacing/capitalization consistent. Remove transaction block use for object creation. Remove unneeded function GRANTs.
Diffstat (limited to 'contrib/reindexdb')
-rw-r--r--contrib/reindexdb/reindexdb10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/reindexdb/reindexdb b/contrib/reindexdb/reindexdb
index e9597e5fecb..e9bfbbb052b 100644
--- a/contrib/reindexdb/reindexdb
+++ b/contrib/reindexdb/reindexdb
@@ -1,6 +1,6 @@
#!/bin/sh
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #
-# Package : reindexdb Version : $Revision: 1.1 $
+# Package : reindexdb Version : $Revision: 1.2 $
# Date : 05/08/2002 Author : Shaun Thomas
# Req : psql, sh, perl, sed Type : Utility
#
@@ -184,11 +184,11 @@ fi
# If index was set, reindex that index.
if [ "$index" ]; then
- $PSQL $PSQLOPT $ECHOOPT -c "REINDEX INDEX $index" -d $dbname
+ $PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX INDEX $index" -d $dbname
# Ok, no index. Is there a specific table to reindex?
elif [ "$table" ]; then
- $PSQL $PSQLOPT $ECHOOPT -c "REINDEX TABLE \"$table\"" -d $dbname
+ $PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX TABLE \"$table\"" -d $dbname
# No specific table, no specific index, either we have a specific database,
# or were told to do all databases. Do it!
@@ -204,9 +204,9 @@ else
# Ok, reindex every table in the database. Use the same method
# we used to get a list of databases, and get a list of tables in this
# database that we may reindex.
- tables=`$PSQL $PSQLOPT -q -t -A -d $db -c "$sql"`
+ tables=`$PSQL $PSQLOPT -q -t -A -d $db -c "SET autocommit TO 'on';$sql"`
for tab in $tables; do
- $PSQL $PSQLOPT $ECHOOPT -c "REINDEX TABLE \"$tab\"" -d $db
+ $PSQL $PSQLOPT $ECHOOPT -c "SET autocommit TO 'on';REINDEX TABLE \"$tab\"" -d $db
done
done