Обсуждение: Command line psql and other ODBC access.

Поиск
Список
Период
Сортировка

Command line psql and other ODBC access.

От
"T. Lackey"
Дата:
Since Postgre is ODBC compliant can I access other ODBC databases directly from  psql ( the "postgres=#" prompt)? If so how?
 
I would like to use databases created in MySQL or MS ACCESS or Oracle or whatever without doing any conversion or importing to PostgreSQL. I have no problem using ACCESS to manipulate a Postgre database. I want to go the other way.  
 
I am running version 8.1-Beta4 on Windows XP.
 
 

Re: Command line psql and other ODBC access.

От
Sean Davis
Дата:


On 12/15/05 9:12 AM, "T. Lackey" <lackey@ltu.edu> wrote:

> Since Postgre is ODBC compliant can I access other ODBC databases directly
> from  psql ( the "postgres=#" prompt)? If so how?

 psql is simply a client for postgresql, so it doesn't deal with ODBC at
all.

> I would like to use databases created in MySQL or MS ACCESS or Oracle or
> whatever without doing any conversion or importing to PostgreSQL. I have no
> problem using ACCESS to manipulate a Postgre database. I want to go the other
> way.

There isn't an entirely transparent way of connecting databases together,
but DBI-link gets pretty close.  It uses pl/perl to emulate tables from an
external source (MySQL, Oracle, and the like) in postgresql.

See here:

http://www.varlena.com/varlena/GeneralBits/100.php

And here:

http://pgfoundry.org/projects/dbi-link