Re: Fail-over PG server in connection string - syntax ? - Mailing list pgsql-jdbc

From Chen Huajun
Subject Re: Fail-over PG server in connection string - syntax ?
Date
Msg-id 51EE2159.8000109@cn.fujitsu.com
Whole thread Raw
In response to Fail-over PG server in connection string - syntax ?  (Mistina Michal <Michal.Mistina@virte.sk>)
List pgsql-jdbc
hi Michal,


 >What is the correct syntax for building connection string? Should the fail-over within postgres-jdbc driver work?

The correct syntax is as the following
jdbc:postgresql://host1:port1,host2:port2/test


 >                  String connectionString = "jdbc:postgresql://pgsqldc1:5432/test,pgsqldc2:5432/test";

In the above sample,the correct connection string should looks like that

String connectionString = "jdbc:postgresql://pgsqldc1:5432,pgsqldc2:5432/test";


Best regards,
Chen Huajun





pgsql-jdbc by date:

Previous
From: Mistina Michal
Date:
Subject: Fail-over PG server in connection string - syntax ?
Next
From: Sven Holcombe
Date:
Subject: Unpack an org.postgresql.geometric.PGpoint