Connect to remote database via psql?

Connect to remote database via psql?

am 08.06.2006 17:56:31 von unknown

Hi List;

I've setup an ODBC connection from my Linux/Postgres laptop to a Lunux/po=
stgres server. I can connect via isql to the remote database.

How can I select data from the remote database from within an sql stateme=
nt in psql on my local machine?

For example I'd like to be able to specify the server@database.table to c=
onnect on the fly from straight SQL. =20

Is this possible?





---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: Connect to remote database via psql?

am 09.06.2006 10:20:29 von Ludek Finstrle

> I've setup an ODBC connection from my Linux/Postgres laptop to
> a Lunux/postgres server. I can connect via isql to the remote database.
>
> How can I select data from the remote database from within an sql
> statement in psql on my local machine?

Is it ODBC related? I think psql isn't our focus.
BTW psql have to be connected to some backend (PgSQL server). So
I'm not sure if I understand you well.

> For example I'd like to be able to specify the server@database.table
> to connect on the fly from straight SQL.
>
> Is this possible?

You could look at contrib/dblink. It could be what are you looking for.

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match