1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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.
This commit is contained in:
Bruce Momjian
2002-10-18 18:41:22 +00:00
parent fb9bc342ff
commit aa4c702eac
91 changed files with 3530 additions and 2643 deletions

View File

@ -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