Re: how to: psql -U user --password password ?

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: how to: psql -U user --password password ?
Дата
Msg-id 468A489A.4080704@iol.ie
обсуждение исходный текст
Ответ на how to: psql -U user --password password ?  (Stefan Zweig <stefanzweig1881@web.de>)
Список pgsql-general
On 03/07/2007 13:47, Stefan Zweig wrote:

> i know already that there is a way to connect to a remote postgres
> using psql with the options --host 123.123.123.1 --port 5432
> --username --password

You can specify the username on the command line, but not the password:
the --password option only ensures the psql will prompt for the password.

The usual thing, as I understand it, is to use a .pgpass file: have a
look at the docs, here:

   http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html

> very large *.sql files to import) and more convenient to do the
> import directly via psql instead of using jdbc/odbc.

Also, if the files you're importing were created by pg_dump, they'll
contain various "backslash" commands that are psql-specific, so you
*have* to re-import them via psql.

HTH,

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

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

Предыдущее
От: Viatcheslav Kalinin
Дата:
Сообщение: Re: how to: psql -U user --password password ?
Следующее
От: Peter Wiersig
Дата:
Сообщение: Re: how to: psql -U user --password password ?