From cedric@precidata.com Fri Oct 3 12:53:08 2014 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-- From michael.paquier@gmail.com Fri Oct 3 13:07:55 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa2aQ-0003SI-Pa for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 13:07:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xa2aQ-0004js-8I for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 13:07:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xa2aO-0004h5-KY for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 13:07:52 +0000 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xa2aL-0003oo-G4 for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 13:07:50 +0000 Received: by mail-qc0-f176.google.com with SMTP id r5so916793qcx.21 for ; Fri, 03 Oct 2014 06:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ndM2HiekcxgbIbuHHctxx62APlrAmku50aR/JKUEfG8=; b=RDnVKxSlbvPH8ip9hy1BVP5+1RjFHgrlODMaKIwLiBR0OeGRLmr0PuKPmrC3c++bjN 2Lu0RGmhPxpd0DEy+ZCJf/ypzXVAr4qF/s7Rr/vCISkaM4lTZXgpse1EMzU6adLufqzq O5J4E+5ddIbGbHhTNR8NAIXgVPN0+iEnrh2r8inda0mPggFfHKuParB8tTCkA90jdDa3 PNoAFDtVhUC3a7V37UrK36XYoH3RoBwogcWr+hDO9i0Ue0uR7Pbb6RWq2dsQojAb7H8e isxWOun0zWAhdhm5rUWG0D+62X3BQRADPp0LbSJ2wjcN0yv7JtPw7Wrf3XAMNvJKLAnv CdSw== MIME-Version: 1.0 X-Received: by 10.140.84.231 with SMTP id l94mr5395451qgd.84.1412341668333; Fri, 03 Oct 2014 06:07:48 -0700 (PDT) Received: by 10.140.101.243 with HTTP; Fri, 3 Oct 2014 06:07:48 -0700 (PDT) In-Reply-To: <542E9C29.5080306@precidata.com> References: <542E9C29.5080306@precidata.com> Date: Fri, 3 Oct 2014 22:07:48 +0900 Message-ID: Subject: Re: ODBC + Access not working for Foreign Table (FDW) From: Michael Paquier To: Cedric Berger Cc: PostgreSQL mailing lists Content-Type: multipart/alternative; boundary=001a11c1198a71595c0504846bd1 X-Pg-Spam-Score: -2.0 (--) 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 --001a11c1198a71595c0504846bd1 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Oct 3, 2014 at 9:52 PM, Cedric Berger wrote: > strcat(tables_query, " where relkind in ('r', 'v')"); > should be modified to add the 'f' type. > Is that correct? > Close enough, there are a couple of extra things to consider though. > Could someone have a look at that? > Well, this has been raised not so long ago, resulting in the submission of a not-so-beautiful patch I have to say :) http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail.com Regards, -- Michael --001a11c1198a71595c0504846bd1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Fri, Oct 3, 2014 at 9:52 PM, Cedric Berger <cedric@precidata.com= > wrote:
=A0=A0=A0=A0 strcat(tables_query, " where relkind in ('r', &#= 39;v')");
should be modified to add the 'f' type.
Is that correct?
Close enough, there are a c= ouple of extra things to consider though.
=A0
Could someone have a look at that?
Well, this has been raised not so long ago, resulting in= the submission of a not-so-beautiful patch I have to say :)
http://www.postgresql.org/message-id/CAB7nPqR= 0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail.com
Reg= ards,
--
Michael
--001a11c1198a71595c0504846bd1-- From cedric@precidata.com Fri Oct 3 13:19:03 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa2lD-0003qI-Fl for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 13:19:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xa2lC-0004Zp-Sx for pgsql-odbc@arkaria.postgresql.org; Fri, 03 Oct 2014 13:19:02 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xa2lC-0004Zf-BO for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 13:19:02 +0000 Received: from ne-6.precidata.com ([157.26.74.6] helo=ne6-sys-email.precidata.net) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xa2l8-00040W-HT for pgsql-odbc@postgresql.org; Fri, 03 Oct 2014 13:19:00 +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 ae2d4a9d; Fri, 3 Oct 2014 15:18:54 +0200 (CEST) Message-ID: <542EA23E.3070502@precidata.com> Date: Fri, 03 Oct 2014 15:18:54 +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: Michael Paquier CC: PostgreSQL mailing lists Subject: Re: ODBC + Access not working for Foreign Table (FDW) References: <542E9C29.5080306@precidata.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 On 03/10/14 15:07, Michael Paquier wrote: > On Fri, Oct 3, 2014 at 9:52 PM, Cedric Berger > wrote: > > strcat(tables_query, " where relkind in ('r', 'v')"); > should be modified to add the 'f' type. > Is that correct? > > Close enough, there are a couple of extra things to consider though. > > Could someone have a look at that? > > Well, this has been raised not so long ago, resulting in the submission > of a not-so-beautiful patch I have to say :) > http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail.com Cool! So what is the process here? Is there something I can do to help that code (or sth similar) getting checked in? Thanks, Cedric -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc