Re: Create a new database from JDBC?

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Create a new database from JDBC?
Дата
Msg-id 43EA29AC.2070002@commandprompt.com
обсуждение исходный текст
Ответ на Create a new database from JDBC?  (Dan Armbrust <daniel.armbrust.list@gmail.com>)
Ответы Re: Create a new database from JDBC?  (Dave Page <dpage@vale-housing.co.uk>)
Список pgsql-general
Dan Armbrust wrote:

> How do I make a connection to a Postgresql database that (potentially)
> has 0 databases from jdbc, so that I can issue a create database command?
>
> In that _other_ database, I can make a jdbc connection to an address
> like this:
>
> jdbc:mysql://servername/
>
> And then issue a "Create database foo" command.
>
> Then I can reconnect to
> jdbc:mysql://servername/foo
>
> And everything is good.
>
> If I try to connect to a postgresql database like this:
>
> jdbc:postgresql://servername/
>
> Postgres attempts to connect to a database that is named the same as
> the username I provided.
>
> Certainly not what I want, since that database doesn't exist.  Is
> there a system database I could always count on being available that I
> could connect to?

template1 but only if you allow it from pg_hba.conf.


>
> Thanks,
>
> Dan
>


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

Предыдущее
От: Dan Armbrust
Дата:
Сообщение: Create a new database from JDBC?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: plruby