This method is no longer supported. Use a java.sql.BasicDataSource or com.screenscraper.datamanager.SshDataSource instead. See the SqlDataManager.buildSchemas page for examples.

SqlDataManager dataManagerFactory.getPostreSqlDataManager ( ScrapingSession session, String host, String database, String username, String password, String queryString ) (professional and enterprise editions only)


Create a Postgre data manager object.


  • session The scraping session that the data manager should be attached to.
  • host The database host (URL and maybe Port), as a string.
  • database The name of the database, as a string.
  • username Username that is being used to access the database, as a string.
  • password The username's associated password, as a string.
  • parameters URL encoded query string, as a string.

Return Values

Returns a SqlDataManager object. If an error is experienced it will be thrown.

Change Log

Version Description
5.0 Available for professional and enterprise editions.

In order to create the Postgre data manager you will need to make sure to install the appropriate jdbc driver. This can be done by downloading the Postgre JDBC driver and placing it in the lib/ext folder in the screen-scraper installation directory.


Create a Postgre Data Manager

 // Import classes
 import com.screenscraper.datamanager.*;
 import org.apache.commons.dbcp.BasicDataSource;

 // Set Variables
 host = "";
 database = "mydb";
 username = "user";
 password = "pwrd";
 parameters = null;

 // Get PostgreSQL datamanager
 dm = DataManagerFactory.getPostreSqlDataManager( session, host, database, username, password, parameters);