X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fbuilder.sh;h=74e009c07125b22aa9c34e2e2b6226ab23905b9c;hb=3ad317381216c7fb25345ecdd10fb87c05d4e73d;hp=cdb8a313ecc3c9911fe14aee12c6f39126de5415;hpb=bac911c2c536f3e4d15211fd3f41f0fc3d0e57b8;p=brisk.git 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]"