1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

patch for new OID74Test

This commit is contained in:
Dave Cramer
2003-12-18 04:17:17 +00:00
parent b9deede241
commit b4ed1edb57

View File

@ -2,6 +2,7 @@ package org.postgresql.test;
import java.sql.*;
import junit.framework.TestCase;
import java.util.Properties;
/*
* Utility class for JDBC tests
@ -61,10 +62,21 @@ public class TestUtil
*/
public static java.sql.Connection openDB()
{
return openDB(new Properties());
}
/*
* Helper - opens a connection with the allowance for passing
* additional parameters, like "compatible".
*/
public static java.sql.Connection openDB(Properties props)
{
props.setProperty("user",getUser());
props.setProperty("password",getPassword());
try
{
Class.forName("org.postgresql.Driver");
return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword());
return java.sql.DriverManager.getConnection(getURL(), props);
}
catch (ClassNotFoundException ex)
{