FW: Creating database links

From: "Ferrell, Denise CTR NSWCDD, Z11" <denise(dot)ferrell(dot)ctr(at)navy(dot)mil>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: FW: Creating database links
Date: 2014-10-02 17:43:01
Message-ID: 2BC18916DE4BF141AC1EFC55CE2CAE7D5817E5@NAEANRFKXM01V.nadsusea.nads.navy.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Jorge,

What would be the syntax for extracting all columns from a database table using dblink? Could this be used if you are unsure of the structure of the table you're extracting from?

Thank you in advance,
d

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Jorge Fernandez
Sent: Thursday, May 22, 2014 11:22 AM
To: Tom Lane
Cc: Ferrell, Denise CTR NSWCDD, Z11; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Creating database links


This is what we're using , don't forget to install db_link module

select * from dblink('host=1192.168.1.1 dbname=mydb port=5432 user=myuser password=my_password', 'select name from country') as t1 (proname name, prosrc text);


Best Regards...


2014-05-22 12:10 GMT-03:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:


"Ferrell, Denise CTR NSWCDD, Z11" <denise(dot)ferrell(dot)ctr(at)navy(dot)mil> writes:
> I've looked thru the documentation and I can't find where PostgreSQL allows for database links (something similar to what's available in Oracle).


Closest thing we've got is foreign tables based on the postgres_fdw
foreign data wrapper (or you could use a different wrapper if you
want to link to a non-Postgres database).

regards, tom lane


--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin





--

Jorge Daniel Fernandez

Leader - DBA Team


S: elgaita99 | t:@openenglish

w: www.openenglish.com <http://www.openenglish.com/>


<http://www.openenglish.com/>

Opensoft Argentina S.R.L
552 Suipacha , Piso 3to, Capital Federal Argentina, (C1022AAR)


(*) The content of this electronic message may be privileged and confidential.
(*) If you are not an intended recipient of this email, please delete it and do not use it.
(*) The Open English name and the Open English logo are registered trademarks.
(*) Opensoft Argentina S.R.L is a vendor company of Open English LLC.




<http://www.openenglish.com/>

--

Jorge Daniel Fernandez

Leader - DBA Team

S: elgaita99 | t:@openenglish
w: www.openenglish.com <http://www.openenglish.com/>

<http://www.openenglish.com/>
Opensoft Argentina S.R.L
552 Suipacha , Piso 3to, Capital Federal Argentina, (C1022AAR)

(*) The content of this electronic message may be privileged and confidential.
(*) If you are not an intended recipient of this email, please delete it and do not use it.
(*) The Open English name and the Open English logo are registered trademarks.
(*) Opensoft Argentina S.R.L is a vendor company of Open English LLC.

<http://www.openenglish.com/>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ferrell, Denise CTR NSWCDD, Z11 2014-10-02 17:46:17 PostgreSQL Tool
Previous Message Holger.Friedrich-Fa-Trivadis 2014-10-02 14:03:13 could not truncate directory "pg_subtrans": apparent wraparound