Re: create batch script to import into postgres tables
От | cgerard999@gmail.com |
---|---|
Тема | Re: create batch script to import into postgres tables |
Дата | |
Msg-id | AB7CEEE5-3BC8-4F24-83D1-C60744E9B479@gmail.com обсуждение исходный текст |
Ответ на | Re: create batch script to import into postgres tables (Adrian Klaver <adrian.klaver@aklaver.com>) |
Ответы |
Re: create batch script to import into postgres tables
Re: create batch script to import into postgres tables |
Список | pgsql-admin |
Remove the quotes around echo
echo select count(*) from web_20200619; | "C:\Program Files\postgresql\11\bin\psql" -d *** -h *** -U ***
or, store your query into a text file and use
psql -f query.sql
Sent from my mobile phone
Le 19 juin 2020 à 02:00, Adrian Klaver <adrian.klaver@aklaver.com> a écrit :
On 6/18/20 4:37 PM, Pepe TD Vo wrote:thank you for the link. I did try it and it's still errorecho 'SELECT count(*) FROM tableA;' |C:\Program Files\PostgreSQL\11\bin\psql -U PSmasteruser -d PSCIDR -h hostname.amazonaws.com -p 5432
This is getting old. The error is?I can run 'psql -u postgres -d PSCIDR -p 5432' (on Linux server, still learning how to run it from psql shell in Window) fine from psql prompt. Just still wonder how to connect directly to the instance PSCIDR from scripting in both aws and linux. Otherwise manually run using pgAdmin.v/r,***Bach-Nga
--
Adrian Klaver
adrian.klaver@aklaver.com
В списке pgsql-admin по дате отправления: