Обсуждение: getTableName(column+1) returns null ?

Поиск
Список
Период
Сортировка

getTableName(column+1) returns null ?

От
Oguz Imre
Дата:
Gentle people,


<excerpt><excerpt>I am using PostgreSQL 7.3, with JDBC driver "
<fixed><color><param>F4F4,7979,9C9C</param>org.postgresql.Driver</color></fixed>"
on Mac OSX 10.2.3 platform (JDK 1.3.1). <fixed><color><param>A5A5,1C1C,DCDC</param>

</color></fixed></excerpt></excerpt>

<excerpt><excerpt><fixed><color><param>A5A5,1C1C,DCDC</param>
String tableName = metaData.getTableName(column+1);</color></fixed>

</excerpt></excerpt>

<excerpt><excerpt>returns "" (null?). Is there a way to circumvent
this? I thought I have downloaded the most recent driver from
"http://jdbc.postgresql.org/download.html", JDBC2+. What am I doing
wrong?</excerpt></excerpt>
Gentle people,

>> I am using PostgreSQL 7.3, with JDBC driver " org.postgresql.Driver"
>> on Mac OSX 10.2.3 platform (JDK 1.3.1).

>>         String tableName = metaData.getTableName(column+1);

>> returns "" (null?). Is there a way to circumvent this? I thought I
>> have downloaded the most recent driver from
>> "http://jdbc.postgresql.org/download.html", JDBC2+. What am I doing
>> wrong?

Re: getTableName(column+1) returns null ?

От
Barry Lind
Дата:
Oguz,

The protocol that postgres uses to communicate between the client (jdbc
in this case) and the server doesn't have a concept of exposing to the
client what table maps to a particular select item in a result set,
therefore the driver can not report anything useful to the caller.  Thus
the driver always returns "".

--Barry


Oguz Imre wrote:
> Gentle people,
>
>         I am using PostgreSQL 7.3, with JDBC driver "
>         org.postgresql.Driver" on Mac OSX 10.2.3 platform (JDK 1.3.1).
>
>
>         String tableName = metaData.getTableName(column+1);
>
>
>         returns "" (null?). Is there a way to circumvent this? I thought
>         I have downloaded the most recent driver from
>         "http://jdbc.postgresql.org/download.html", JDBC2+. What am I
>         doing wrong?
>
>