Re: How to write sql to access another odbc source.

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: How to write sql to access another odbc source.
Дата
Msg-id 4EA66C78.3020600@ringerc.id.au
обсуждение исходный текст
Ответ на How to write sql to access another odbc source.  (Rich <rhdyes@gmail.com>)
Список pgsql-sql
On 19/10/11 22:08, Rich wrote:
> I have a mumps database with an ODBC connection so I can write queries
> from other databases.  How can I write a sql in Postgresql to access
> this table to use in my Postgresql reports?

Use dbi-link to make an ODBC connection to the other database. Either
copy the data into a PostgreSQL table for processing, or make a view
over the dbi-link function call to query the data each time. The latter
option is slow, but requires no periodic refreshing of the copied table.

If you're on PostgreSQL 9.1 I'd recommend copying the data from the
other database via dbi-link into an unlogged table.

See: http://pgfoundry.org/projects/dbi-link and the documentation for
the dbi-link contrib module in your version of PostgreSQL.

Hopefully in 9.2 the odbc foreign data wrapper will be working and ready
for general use, in which case you'll be able to do it even more easily
using ODBC FDW (SQL/MED).



--
Craig Ringer


В списке pgsql-sql по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: advice on how to store variable attributes
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: CTE or Subselect and outer joins not behaving as expected?