From: | SERFIOTIs gewrgios <serfioti(at)csd(dot)uoc(dot)gr> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Acquiring views |
Date: | 2002-06-12 14:01:55 |
Message-ID: | Pine.GSU.4.44.0206121649080.2652-100000@tilos.csd.uch.gr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
Hi,
i'm using the function getTables() of interface DatabaseMetaData
trying to obtain the names of the views which are defined in the database.
However, although it works with an Oracle Database, it doesn't work in a
Postgresql Database.
The exact statement i'm using is the following:
String types[] = new String[1];
types[0] = new String("VIEW");
ResultSet rs = this.dbmd.getTables(null, null, null, types);
The result is that I get java.lang.NullPointerException at the last line,
although I do have a view declared!
When I'm using: types[0] = new String("TABLE") instead it works fine. Is
there a problem between what PostgreSQL considers a view, and what JDBC
considers a view?
Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Burke | 2002-06-12 14:04:54 | Re: Updates are slow.. |
Previous Message | Tom Lane | 2002-06-12 13:57:44 | Re: automatic time zone conversion |
From | Date | Subject | |
---|---|---|---|
Next Message | John Taylor | 2002-06-12 15:07:26 | Optimising inside transactions |
Previous Message | Arthur & Kathy Yeo | 2002-06-12 13:19:44 | Re: Getting ResultSet using JDBC when calling Stored-Procedures |