From: Matteo Nastasi Date: Tue, 1 Mar 2011 04:48:34 +0000 (+0100) Subject: piped target added for multiple select X-Git-Tag: 3.4.2~1^2 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=3ad317381216c7fb25345ecdd10fb87c05d4e73d;p=brisk.git piped target added for multiple select --- diff --git a/sql/builder.sh b/sql/builder.sh index cdb8a31..74e009c 100755 --- a/sql/builder.sh +++ b/sql/builder.sh @@ -62,7 +62,9 @@ elif [ "$1" = "rebuild" ]; then echo "-- MESG: build start" ; one_or_all $2 | grep -iv '^drop' ; echo "-- MESG: build end" ; ) \ | sqlexe $sht elif [ "$1" = "psql" ]; then - psql -h $DBHOST -U $DBUSER $DBBASE + psql -h $DBHOST -U $DBUSER $DBBASE $@ +elif [ "$1" = "piped" ]; then + psql -h $DBHOST -U $DBUSER $DBBASE -t -q -A -F '|' $@ elif [ "$1" = "dump" ]; then if [ $# -eq 1 ]; then pg_dump -a --inserts -h $DBHOST -U $DBUSER $DBBASE @@ -85,6 +87,7 @@ else echo " ./builder build" echo " ./builder rebuild" echo " ./builder psql" + echo " ./builder piped" echo " ./builder add " echo " ./builder dump [dumpfile]" echo " ./builder dumpall [dumpfile]"