Обсуждение: ODBC + Access not working for Foreign Table (FDW)
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
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
On Fri, Oct 3, 2014 at 9:52 PM, Cedric Berger <cedric@precidata.com> wrote:
Well, this has been raised not so long ago, resulting in the submission of a not-so-beautiful patch I have to say :)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?
http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail.com
--
Michael
Michael
On 03/10/14 15:07, Michael Paquier wrote:
> On Fri, Oct 3, 2014 at 9:52 PM, Cedric Berger <cedric@precidata.com
> <mailto:cedric@precidata.com>> 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