I have two databases in Postgres and want to access the data from one database to other database tables. I tried the following:
dblink_connect('myconn','hostaddr=10.10.30.53 dbname=postgres user=postgres password=postgres')
and
dblink_connect_u('myconn','hostaddr=10.10.30.53 dbname=postgres user=postgres password=postgres')
This results in a syntax error:
ERROR: syntax error at or near "dblink_connect" LINE 1: dblink_connect('myconn','hostaddr=10.10.30.53 dbname=postgre... ^
********** Error ********** ERROR: syntax error at or near "dblink_connect" SQL state:
Do I need to change anything in pg.hba.conf
file?
Can anybody give me the steps with an example?