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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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
>
>



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to