Postgresql: Create dblink

---Sql: CREATE EXTENSION dblink; ---Then you can use it like this: select * from dblink('dbname=otherdbname','select field1, field2 from otherdb_table') as foreign_table(field1 varchar, field2 integer)
Very useful method to access to data contained into another database on same postgresql server.
Current user must have permissions to read foreign database tables.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.