Re: psql in a bash function

2018-03-12 Thread Ron Johnson
al message From: Ron Johnson Date: 3/12/18 2:15 PM (GMT-05:00) To: pgsql-general Subject: psql in a bash function Hi, Because I need to log into many servers, I created functions as keyboard shortcuts (not aliases, since I will want to embed these shortcuts in other functions).

Re: psql in a bash function

2018-03-12 Thread Eric Raskin
Subject: psql in a bash function Hi, Because I need to log into many servers, I created functions as keyboard shortcuts (not aliases, since I will want to embed these shortcuts in other functions). psqlxyz () {     echo "P1=$1";     echo "P2=$2";     psql -U po

Re: psql in a bash function

2018-03-12 Thread Melvin Davidson
On Mon, Mar 12, 2018 at 2:14 PM, Ron Johnson wrote: > Hi, > > Because I need to log into many servers, I created functions as keyboard > shortcuts (not aliases, since I will want to embed these shortcuts in other > functions). > > psqlxyz () > { > echo "P1=$1"; > echo "P2=$2"; > psql

psql in a bash function

2018-03-12 Thread Ron Johnson
Hi, Because I need to log into many servers, I created functions as keyboard shortcuts (not aliases, since I will want to embed these shortcuts in other functions). psqlxyz () {     echo "P1=$1";     echo "P2=$2";     psql -U postgres -h XYZ $@ } This is the (simple, test) command that I wan