Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa2M8-0002vJ-JQ for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 12:53:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xa2M8-0006bH-25 for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 12:53:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xa2M6-0006aA-Qb for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 12:53:06 +0000 Received: from ne-6.precidata.com ([157.26.74.6] helo=ne6-sys-email.precidata.net) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xa2M3-0006CN-4P for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 12:53:05 +0000 Received: from ne6-sys-proxy.precidata.net (ne6-sys-proxy.precidata.net [127.1.0.13]); by ne6-sys-email.precidata.net (OpenSMTPD) with ESMTP id 2827ae53; Fri, 3 Oct 2014 14:52:57 +0200 (CEST) Message-ID: <542E9C29.5080306@precidata.com> Date: Fri, 03 Oct 2014 14:52:57 +0200 From: Cedric Berger User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: ODBC + Access not working for Foreign Table (FDW) Content-Type: multipart/alternative; boundary="------------040006090103020807040709" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------040006090103020807040709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, Having just tested my first FDW, I tried to access my foreign tables with MS Access 2000 using the latest MS ODBC driver. Unfortunately, I just found that foreign tables are not listed when you do " Get External Data => Link Tables": Only Views and Regular tables are shown. I could workaround the problem by defining a view: CREATE VIEW workaround AS SELECT * FROM foreign_table. But it sucks, and I don't know if there are performance drops going through a view like that. I glanced at the ODBC sources, and my guess is that inside info.c, lines like: strcat(tables_query, " where relkind in ('r', 'v')"); should be modified to add the 'f' type. Is that correct? Could someone have a look at that? right now, I can test a MSI, but I've never compiled ODBC myself. Cedric --------------040006090103020807040709 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello,

Having just tested my first FDW, I tried to access my foreign
tables with MS Access 2000 using the latest MS ODBC driver.

Unfortunately, I just found that foreign tables are not listed
when you do " Get External Data => Link Tables": Only Views
and Regular tables are shown.

I could workaround the problem by defining a view:

   CREATE VIEW workaround AS SELECT * FROM foreign_table.

But it sucks, and I don't know if there are performance drops
going through a view like that.

I glanced at the ODBC sources, and my guess is that inside
info.c, lines like:

     strcat(tables_query, " where relkind in ('r', 'v')");

should be modified to add the 'f' type.

Is that correct?
Could someone have a look at that?

right now, I can test a MSI, but I've never compiled ODBC myself.

Cedric

--------------040006090103020807040709--