X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 38F929F9CD8 for ; Mon, 22 May 2006 20:17:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 52344-01 for ; Mon, 22 May 2006 20:17:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 9C8899F9B14 for ; Mon, 22 May 2006 20:17:21 -0300 (ADT) Received: (qmail 27258 invoked by uid 1112); 22 May 2006 23:17:15 -0000 Date: Mon, 22 May 2006 18:17:14 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Glenn Holmer cc: pgsql-jdbc@postgresql.org Subject: Re: DatabaseMetaData In-Reply-To: <200605221734.06987.gholmer@weycogroup.com> Message-ID: References: <200605221734.06987.gholmer@weycogroup.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/104 X-Sequence-Number: 15232 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