From 3ad317381216c7fb25345ecdd10fb87c05d4e73d Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Tue, 1 Mar 2011 05:48:34 +0100 Subject: [PATCH] piped target added for multiple select --- sql/builder.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]" -- 2.17.1