Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
Yes syntax correct but it cannot produce because foreign key cannot connect to other database.. Postgresql cannot do Query joining on Across Database..
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
foreign keycannot connect to other database..Postgresqlcannot do Query joining onAcross Database..