JDBC のためのデータベースの準備

Because Java can only use TCP/IP connections, the Postgres postmaster must be running with the -i flag.

Java は TCP/IP 接続しか使用しませんので、 Postgres の postmaster を -i フラグをつけ て実行しなければなりません。

Also, the pg_hba.conf file must be configured. It's located in the PGDATA directory. In a default installation, this file permits access only by UNIX domain sockets. For the JDBC driver to connect to the same localhost, you need to add something like:

また、pg_hba.conf ファイルを設定する必要もあり ます。このファイルは PGDATA ディレクトリにあります。デフォルトのイン ストール状態では、このファイルは UNIX ドメインソケットによるアクセス のみを許しています。JDBC ドライバを使って、同じロ ーカルホストに接続するためには、下のような行を追加する必要があります。

host all 127.0.0.1 255.255.255.255 password

Here access to all databases are possible from the local machine with JDBC.

これで、ローカルマシンから JDBC を使用して、全 てのデータベースへアクセスできるようになります。

The JDBC Driver supports trust, ident, password and crypt authentication methods.

JDBC ドライバは、trust、ident、password、crypt 認証方式をサポートします。