Re: createdb.exe and psql.exe without Promting Password

Поиск
Список
Период
Сортировка
От Iñigo Barandiaran
Тема Re: createdb.exe and psql.exe without Promting Password
Дата
Msg-id 4991C5E0.2080507@vicomtech.org
обсуждение исходный текст
Ответ на Re: createdb.exe and psql.exe without Promting Password  (Raymond O'Donnell <rod@iol.ie>)
Ответы Fwd: createdb.exe and psql.exe without Promting Password  (Iñigo Barandiaran <ibarandiaran@vicomtech.org>)
Fwd: createdb.exe and psql.exe without Promting Password  (Iñigo Barandiaran <ibarandiaran@vicomtech.org>)
Re: createdb.exe and psql.exe without Promting Password  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Thanks Raymon.<br /><br /> I'm using Windows XP.<br /><br /> What does "visible to the script" means?<br /><br />
Thanksin advance!<br /><br /> Best,<br /><blockquote cite="mid:4991C35C.1010907@iol.ie" type="cite"><pre wrap="">On
10/02/200918:04, Inigo Barandiaran wrote:
 
 </pre><blockquote type="cite"><pre wrap="">I would like to create an script that includes calls to createdb.exe and
psql.exe. I would like to use them with a user but without asking or
prompting for pasword. For example:createdb.exe -T template0 -U MyPosgresUser MyDataBaseName.

I've read that if I define an environment variable like SET
PGPPASSWORD=MyPosgresUserPassword, both calls dont ask for password. I've
tested this variable in different platforms and does not work. 
Do you know how so solve it?   </pre></blockquote><pre wrap="">
What platform(s) did you test it on? Are you sure that the environment
variable was visible to the script?

Another option is to use a .pgpass file:
 <a class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/8.3/static/libpq-pgpass.html">http://www.postgresql.org/docs/8.3/static/libpq-pgpass.html</a>

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
<a class="moz-txt-link-abbreviated" href="mailto:rod@iol.ie">rod@iol.ie</a>
Galway Cathedral Recitals: <a class="moz-txt-link-freetext"
href="http://www.galwaycathedral.org/recitals">http://www.galwaycathedral.org/recitals</a>
------------------------------------------------------------------
 </pre></blockquote><br />

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Slow database creation
Следующее
От: Sam Mason
Дата:
Сообщение: Re: does anyone know what to use in pg_hba.conf that will allow me to run cronjobs with pg_dump?