Re: Acquiring views

From: Barry Lind <barry(at)xythos(dot)com>
To: SERFIOTIs gewrgios <serfioti(at)csd(dot)uoc(dot)gr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Acquiring views
Date: 2002-06-13 05:01:01
Message-ID: 3D08270D.4080606@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

What version of the driver are you using? I am unable to reproduce the
problem with the latest driver.

--Barry

SERFIOTIs gewrgios wrote:
> 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.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2002-06-13 06:00:53 Re: Troubleshooting SPI_execp() failed in
Previous Message Joshua b. Jore 2002-06-13 04:52:11 Re: Troubleshooting SPI_execp() failed in RI_FKey_cascade_del()

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-06-13 14:03:47 Re: Updateable result set
Previous Message Steve Kirby 2002-06-12 23:36:31 lo_import