From: Kris Jurka <books@ejurka.com>
To: Glenn Holmer <gholmer@weycogroup.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: DatabaseMetaData
Date: Mon, 22 May 2006 18:17:14 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0605221814510.9728@leary2.csoft.net> (raw)
In-Reply-To: <200605221734.06987.gholmer@weycogroup.com>
References: <200605221734.06987.gholmer@weycogroup.com>
On Mon, 22 May 2006, Glenn Holmer wrote:
> Can someone give me the right incantation to get the names of the
> columns in a table using DatabaseMetaData? I'm trying
>
> dmd = conn.getMetaData();
> rs = dmd.getColumns("pg_attribute", "public", "tsoldto", null);
>
> (where "tsoldto" is the name of my table) and not getting anything in
> the result set. What is that last argument supposed to be if I want to
> retrieve all the column names, and are the first two correct?
>
The first argument should be your database name, but this is not actually
causing a problem because that parameter is ignored because pg does not
support cross database calls. Other than that it looks good. Are you
sure it's in the public schema? Are you sure it wasn't created with a
case sensitive table name "tSoldTo" or something?
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, gholmer@weycogroup.com
Subject: Re: DatabaseMetaData
In-Reply-To: <Pine.BSO.4.63.0605221814510.9728@leary2.csoft.net>
References: <200605221734.06987.gholmer@weycogroup.com> <Pine.BSO.4.63.0605221814510.9728@leary2.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox