Using psql, pg_dump, pg_restore in a script

Поиск
Список
Период
Сортировка
От John Scalia
Тема Using psql, pg_dump, pg_restore in a script
Дата
Msg-id 539F3D20.1060001@gmail.com
обсуждение исходный текст
Ответы Re: Using psql, pg_dump, pg_restore in a script
Список pgsql-admin
Hi all,

My latest task requires me to script extracting the latest data from a partitioned table and put it into another
databaseon a different machine on an hourly basis. To do this, the  
script uses a psql command to determine which partition to grab, a pg_dump to get it, and pg_restore to put into the
otherDb. My issue is that I'd like to make this script very  
portable but it seems that whenever you pass a "-h <somehost> -U <someuser>" to these commands, they will ask for a
passwordwhether "someuser" actually has a password or not. I've  
currently set a password for the user the script uses and I'm using .pgpass to make this work, but was there some
reasonthat an option was not given to enter a password as an  
argument to the command? Maybe something like --password <somepassword>? I know this could potentially be a security
problem,but so is having a password in the .pgpass file in  
clear text.
--
Jay


В списке pgsql-admin по дате отправления:

Предыдущее
От: Payal Singh
Дата:
Сообщение: Re: install language
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Using psql, pg_dump, pg_restore in a script