300e67f4ed7007402acdcbefe884f30c9192a982
- Author
- Pavle Portic <git@theedgeofrage.com>
- Committer
- Pavle Portic <git@theedgeofrage.com>
- Date
Message
Pass additional arguments to dpsql
Diff
1diff --git a/dot_config/zsh/functions/dpsql b/dot_config/zsh/functions/dpsql
2index 477907583d739ad54f9e7f4444430029f4715d0e..337b51ec6af4997e761898e3ba5da97cd9ecd665 100644
3--- a/dot_config/zsh/functions/dpsql
4+++ b/dot_config/zsh/functions/dpsql
5@@ -1,4 +1,7 @@
6 # vim: ft=zsh
7 # connect to dune RDS instance
8
9-PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${1}_${2}_db_${2}_user_password --output text --query SecretString) psql -U ${2} -h ${1}-${2}-db.tailf3b9f.ts.net ${2}
10+env=${1}
11+db=${2}
12+shift 2
13+PGPASSWORD=$(aws secretsmanager get-secret-value --secret-id ${env}_${db}_db_${db}_user_password --output text --query SecretString) psql $@ -U ${db} -h ${env}-${db}-db.tailf3b9f.ts.net ${db}