Thread: link tables

link tables

From
Jonatan Malaver
Date:

Hello,

 

    Is there a way to link a table from MS SQL to postgresql table? I’m uysing CentOS 6.5 x64 with postgresql 9.2.

 

Thanks,

 

Jon

 

Re: link tables

From
David G Johnston
Date:
Jonatan Malaver wrote
>     Is there a way to link a table from MS SQL to postgresql table? I'm
> uysing CentOS 6.5 x64 with postgresql 9.2.

Define what you specifically mean by "link".

9.2 does have "Foreign Data Wrapper" functionality so if you can locate an
appropriate implementation for MS SQL you would be able to do whatever that
"fdw" allows - which at minimum is perform select queries against foreign
tables.

David J.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/link-tables-tp5803403p5803408.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


Re: link tables

From
Keith
Date:


On Fri, May 9, 2014 at 11:28 AM, Jonatan Malaver <jon.malaver@shrewsburyma.gov> wrote:

Hello,

 

    Is there a way to link a table from MS SQL to postgresql table? I’m uysing CentOS 6.5 x64 with postgresql 9.2.

 

Thanks,

 

Jon

 


Look into Foreign Data Wrappers. Not aware of one dedicated specifically to MS SQL yet

http://wiki.postgresql.org/wiki/Foreign_data_wrappers

ODBC one says it doesn't work with 9.2 yet. The JDBC one may work if you have that driver available.


Re: link tables

From
Jonatan Malaver
Date:
| -----Original Message-----
| From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-
| owner@postgresql.org] On Behalf Of David G Johnston
| Sent: Friday, May 09, 2014 11:42 AM
| To: pgsql-novice@postgresql.org
| Subject: Re: [NOVICE] link tables
|
| Jonatan Malaver wrote
| >     Is there a way to link a table from MS SQL to postgresql table?
| > I'm uysing CentOS 6.5 x64 with postgresql 9.2.
|
| Define what you specifically mean by "link".
|
| 9.2 does have "Foreign Data Wrapper" functionality so if you can locate an
| appropriate implementation for MS SQL you would be able to do whatever
| that "fdw" allows - which at minimum is perform select queries against
| foreign tables.
|
| David J.
|

I would like to JOIN two tables one is in Postgresql and the other one in MS SQL. Is that possible?
Thanks,
Jon


Re: link tables

From
Keith
Date:


On Fri, May 9, 2014 at 1:16 PM, Jonatan Malaver <jon.malaver@shrewsburyma.gov> wrote:

| -----Original Message-----
| From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-
| owner@postgresql.org] On Behalf Of David G Johnston
| Sent: Friday, May 09, 2014 11:42 AM
| To: pgsql-novice@postgresql.org
| Subject: Re: [NOVICE] link tables
|
| Jonatan Malaver wrote
| >     Is there a way to link a table from MS SQL to postgresql table?
| > I'm uysing CentOS 6.5 x64 with postgresql 9.2.
|
| Define what you specifically mean by "link".
|
| 9.2 does have "Foreign Data Wrapper" functionality so if you can locate an
| appropriate implementation for MS SQL you would be able to do whatever
| that "fdw" allows - which at minimum is perform select queries against
| foreign tables.
|
| David J.
|

I would like to JOIN two tables one is in Postgresql and the other one in MS SQL. Is that possible?
Thanks,
Jon


--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice


That is possible with the foreign data wrappers yes, but I doubt the performance is going to be very good. I think you'd be better off getting the table replicated on a regular basis from MS SQL to Postgres. I'm not aware of an easy manner of doing this. Hopefully someone else on the list can help.

Re: link tables

From
Thomas Kellerer
Date:
Keith, 09.05.2014 20:40:
>> I would like to JOIN two tables one is in Postgresql and the other
>> one in MS SQL. Is that possible? Thanks, Jon
>
>
> That is possible with the foreign data wrappers yes, but I doubt the
> performance is going to be very good. I think you'd be better off
> getting the table replicated on a regular basis from MS SQL to
> Postgres.
>
> I'm not aware of an easy manner of doing this. Hopefully
> someone else on the list can help.

If the table isn't too big, a materialized view based on a foreign table could do the trick.


Re: link tables

From
Jonatan Malaver
Date:
| -----Original Message-----
| From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-
| owner@postgresql.org] On Behalf Of Thomas Kellerer
| Sent: Monday, May 12, 2014 2:17 AM
| To: pgsql-novice@postgresql.org
| Subject: Re: [NOVICE] link tables
| 
| Keith, 09.05.2014 20:40:
| >> I would like to JOIN two tables one is in Postgresql and the other
| >> one in MS SQL. Is that possible? Thanks, Jon
| >
| >
| > That is possible with the foreign data wrappers yes, but I doubt the
| > performance is going to be very good. I think you'd be better off
| > getting the table replicated on a regular basis from MS SQL to
| > Postgres.
| >
| > I'm not aware of an easy manner of doing this. Hopefully someone else
| > on the list can help.
| 
| If the table isn't too big, a materialized view based on a foreign table could do
| the trick.
| 
| 
| 
| 
| --
| Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make
| changes to your subscription:
| http://www.postgresql.org/mailpref/pgsql-novice


I'm currently checking out this alternative https://github.com/GeoffMontee/tds_fdw
Jon