Re: .pgpass being ignored

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: .pgpass being ignored
Дата
Msg-id 51C4E333.6080409@gmail.com
обсуждение исходный текст
Ответ на Re: .pgpass being ignored  (Stephen Rasku <postgres@srasku.net>)
Список pgsql-general
On 06/21/2013 04:29 PM, Stephen Rasku wrote:
> On Fri, Jun 21, 2013 at 3:41 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
>>
>> First are you running the script from the location with .pgpass?
>
> I wasn't but I copied the .pgpass into the local directory and I get
> the same results.  The correct location is actually in the home
> directory.
>
>> Second you are doing a createdb, not sure how Postgres handles using .pgpass
>> with database that does not exist yet?  Might want to try a '*' in the database name
>> field or since it looks like it is trying to connect to the postgres database, use that
>> as the database name.
>
> The database actually exists, so createdb should fail with a "database
> exists" error.  However, it didn't get there.

Well the issue is that createdb needs to connect to another database
first in order to create the new database. The default order is shown
below, though it can be overriden:

http://www.postgresql.org/docs/9.2/interactive/app-createdb.html

--maintenance-db=dbname
Specifies the name of the database to connect to when creating the new
database. If not specified, the postgres database will be used; if that
does not exist (or if it is the name of the new database being created),
template1 will be used.



>
> I took your advice anyways and it fixes the problem.  Thanks!
>
> ...Stephen
>
>


--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: Stephen Rasku
Дата:
Сообщение: Re: .pgpass being ignored
Следующее
От: Daniel de Oliveira Mantovani
Дата:
Сообщение: Re: Migration from DB2 to PostgreSQL