how to: psql -U user --password password ?
От | Stefan Zweig |
---|---|
Тема | how to: psql -U user --password password ? |
Дата | |
Msg-id | 135393397@web.de обсуждение исходный текст |
Ответы |
Re: how to: psql -U user --password password ?
Re: how to: psql -U user --password password ? Re: how to: psql -U user --password password ? |
Список | pgsql-general |
Hi list, i have a problem with connecting to postgresql on a remote server. basically i want to import some sets of data into thedatabase, using the psql command from within a shell script. i have a local machine where postgres is installed and a remote one where postgres is installed as well. because of security issues the configuration of postgres on the remote server is set in a way that i am not not allowed toconnect to the database from my local machine. and the security thing gets even stricter: i am not even allowed to runa shell script on my remote server. i know already that there is a way to connect to a remote postgres using psql with the options --host 123.123.123.1 --port5432 --username --password unfortunately this only prompts the password screen and i have to input the password for postgres for every single psql commandagain.. this not very convenient in terms of automating imports using shell. i am planning to do some hundreds ofimports (with psql) on a batch and i want to avoid typing the password some hundreds times. i know that in mysql there is way to pass through the password e.g. to mysqldump with mysqldump --user=user --password=password actually i would need similar functionality in postgres. is there a good way to solve my problem? i know that a i could do the import as well using jdbc or odbc connections to postgres (where it is possible to connect asa user with password), but actually i think it is faster (as i have some very large *.sql files to import) and more convenientto do the import directly via psql instead of using jdbc/odbc. i appreciate any help. thanks in advance, stefan _______________________________________________________________________ Jetzt neu! Schuetzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
В списке pgsql-general по дате отправления: