Can someone please shed some light on how to install the requirements for Postgres 9 (Centos) to be able to use dblink for inter-postgres db querying.
There seems to be no clean documentation out there on how to install dblink requirements in general.
Thanks in advance.
Load the dblink extension into PostgreSQL. CREATE EXTENSION dblink; Create a persistent connection to a remote PostgreSQL database using the dblink_connect function specifying a connection name (myconn), database name (postgresql), port (5432), host (hostname), user (username) and password (password).
dblink is a module that supports connections to other PostgreSQL databases from within a database session.
Description. dblink executes a query (usually a SELECT , but it can be any SQL statement that returns rows) in a remote database. When two text arguments are given, the first one is first looked up as a persistent connection's name; if found, the command is executed on that connection.
You can get all open dblink connections using dblink_get_connections() . Those that are not used can only be found by examining your function code like Erwin suggests.
If you have PostgreSQL 9.1 (or later), make sure the contrib package is installed, e.g., from your shell:
yum install postgres*contrib
Then within the database, use the DDL to create the extension:
CREATE EXTENSION dblink;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With