This topic explains how to configure a PostgreSQL database as an
external data source.
Configure the PostgreSQL Data Source
Add a <Resource> element, to your installation's
labkey.xml configuration file. Use the configuration template below as a starting point. Replace USERNAME, PASSWORD, and DBNAME with the correct values for your environment. If you are running LabKey Server against a remote installation of PostgreSQL, change the url attribute to point to the remote server.
If you will be connecting to more than one data source, be sure that all have unique
name parameters, i.e. pgDataSource1, pgDataSource2, or similar. This value will be used whenever you connect an
external schema to this datasource so it must be unambiguous.
<Resource name="jdbc/pgDataSource" auth="Container"
type="javax.sql.DataSource"
username="USERNAME"
password="PASSWORD"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/DBNAME"
maxTotal="20"
maxIdle="10"
accessToUnderlyingConnectionAllowed="true"
/>
Define a New Schema
To define a new schema from the PostgreSQL data source see
Set Up an External Schema.
Related Topics
PostgreSQL JDBC Driver