【发布时间】:2011-03-26 02:50:36
【问题描述】:
我可以在脚本中间更改/su 用户吗?
if [ "$user" == "" ]; then
echo "Enter the table name";
read user
fi
gunzip *
chown postgres *
su postgres
dropdb $user
psql -c "create database $user with encoding 'unicode';" -U dbname template1
psql -d $user -f *.sql
【问题讨论】: