Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 899B89FB212 for ; Mon, 25 Sep 2006 15:54:01 -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 36029-03 for ; Mon, 25 Sep 2006 15:53:58 -0300 (ADT) X-Greylist: delayed 00:26:52.754339 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A83859FB1EF for ; Mon, 25 Sep 2006 15:53:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from post-26.mail.nl.demon.net (post-26.mail.nl.demon.net [194.159.73.196]) by svr4.postgresql.org (Postfix) with ESMTP id D371A5AF024 for ; Mon, 25 Sep 2006 18:27:03 +0000 (GMT) Received: from melstra.demon.nl ([83.160.170.8]:1188 helo=METALEX) by post-26.mail.nl.demon.net with esmtp (Exim 4.51) id 1GRvAT-0004U4-Nw for pgsql-jdbc@postgresql.org; Mon, 25 Sep 2006 18:27:01 +0000 From: "Alex Stienstra" To: Subject: Re: ResultSetMetaData.getTableName() == null Date: Mon, 25 Sep 2006 20:26:59 +0200 Message-ID: <000001c6e0d0$307437a0$8602a8c0@METALEX> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <4513E3E5.5010502@logix-tt.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.2 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200609/100 X-Sequence-Number: 15818 Hi Markus, I'am surprised that PostgreSQL doesn't pass the table informatie to the client. Susprised, since for example the library PHP (pg_field_table) is using, does pass on this information. I'am quite sure that this library function is based on the same API as the JDBC implementation is. I agree with you that PostgreSQL server should supply this information and implementing a full-flegded SQL parser is no option. Specially, because PostgreSQL already parses the statement and therefore knows the tables and columns that are involved in the query. It is a pitty that this (for me) vital information is not made available. Best regards, Alex. -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Markus Schaber Sent: vrijdag 22 september 2006 15:24 To: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] ResultSetMetaData.getTableName() == null Hi, Alex, Alex Stienstra wrote: > MySQL returns the tablename if possible otherwise the alias. I find > this an acceptable solution. Having at least a name one could query > the meta system in other to determine whether it is a table name or > not. The problem is that PostgreSQL does not pass any information about aliases down to the client. So we have two possibilities to implement this feature: Hack up the server to provide that additional info, or implement a fully-fledged SQL parser in the client and get the alias names ourselves. Both seems not worth it currently. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly