Re: Update PostgreSQL from MS SQL trigger

From: "Igor Kryltsov" <kryltsov(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Update PostgreSQL from MS SQL trigger
Date: 2005-03-08 22:44:08
Message-ID: d0l9ss$nuk$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I managed to link PostgreSQL to MSSQL as a linked server but:

select * from [TEST].[test].[public].[users] <<<TEST - name of linked server
in MSSQL , test - Postgres db name, public - schema name, users - table
Returns:
Server: Msg 7312, Level 16, State 1, Line 7
Invalid use of schema and/or catalog for OLE DB provider 'MSDASQL'. A
four-part name was supplied, but the provider does not expose the necessary
interfaces to use a catalog and/or schema.

Works only via OPENQUERY:

SELECT * FROM OPENQUERY (TEST, 'select * from users');

Does anybody know how to query Postgres WITHOUT OPENQUERY.

I found in groups that:

" According to the documentation, SQL-Server supports any Win32 ODBC
driver ... which would include PostgresODBC. However, in practice,
only Microsoft-supplied drivers actually work; ODBC drivers for
Postgres and MySQL mysteriously do not function with SQL-Server (even
though they do work with MS Access).
I think this is incompetence on Microsoft's part rather than malice;
all of this works through DTS, a utility which is responsible for over
300 Knowledge Base issues.
Note: I have not tried any of this with SQL Server 2000, just 7.0 sp3. "

Thank you,

Igor

"Igor Kryltsov" <kryltsov(at)yahoo(dot)com> wrote in message
news:d0jar6$14rh$1(at)news(dot)hub(dot)org(dot)(dot)(dot)
> Hi,
>
> I have table 'test_m'(id integer) in MSSQL and I want to write
> on_test_m_insert trigger in MS SQL which will insert value into PostgreSQL
> table 'test_p' from database 'test_db' running on host '10.3.2.5'.
>
> Can this be achieved with PostgreSQL ODBC driver? If yes, please post
> template of such trigger.
>
>
> Thank you,
>
>
> Igor
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bernard Grosperrin 2005-03-08 23:25:51 Newbie wonder...
Previous Message Larry Rosenman 2005-03-08 16:58:53 Re: Query issue/8.0.1/Serendipity