I am running the following code
/**
* @param args
*/
public static void main(String[] args) throws SQLException {
System.out.println("starting");
org.postgresql.Driver driver = new org.postgresql.Driver();
DriverManager.registerDriver(driver);
Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5432/epcfe/", "postgres", "aap123!");
Statement st = con.createStatement();
st.executeQuery("select * from epcfeschema.PRODUCT");
System.out.println("done");
}
I keep getting Exception in thread "main" org.postgresql.util.PSQLException: ERROR: relation "epcfeschema.product" does not exist
If I create a table with the lowercase name product this works fine but I need it to work for tables with all caps. How do I keep JDBC from lowercasing my table?
If it’s a hibernate issue, try this:
Or better yet, make your life easy: log on to postgres and rename the table!
(Of course, other code may depend on the cap name…)