pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Filip Rembiałkowski <filip.rembialkowski@gmail.com>
To: Gianvito Pio <pio.gianvito@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Get a table name
Date: Sun, 27 Dec 2009 13:59:35 +0100
Message-ID: <92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com> (raw)
In-Reply-To: <4B3737DA.4070408@gmail.com>
References: <4B3737DA.4070408@gmail.com>

In general, no. That's because resultset columns can be "entangled" in
more complex way than "column a of table b".

2009/12/27, Gianvito Pio <pio.gianvito@gmail.com>:
> Hi all,
> I'm trying to get the table name of a column in this way:
>
> ResultSet rs;
>          try
>          {
>              rs = ps.executeQuery();
>              ResultSetMetaData rsmd = rs.getMetaData();
>              System.out.println(rsmd.getTableName(..));
>
> but the getTableName( ..) method gives me an empty string. Isn't there a
> way to know the table name of a specific field I'm obtaining? Thanks
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

-- 
Wysłane z mojego urządzenia przenośnego

Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/



view thread (8+ messages)  latest in thread

Message-ID: <92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com>
Permalink:  ../92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com/
Also on:    postgresql.org/message-id/92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com

 · 

reply

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: filip.rembialkowski@gmail.com, pio.gianvito@gmail.com
  Subject: Re: Get a table name
  In-Reply-To: <92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com>
  References: <4B3737DA.4070408@gmail.com> <92869e660912270459h55fd3024k97d8c5ee1d4cfd60@mail.gmail.com>

* 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