0
  1. first Database(Database name : abc )
CREATE VIEW sample_view AS
SELECT * FROM  test;

There is another database (database name : xyz) on same server so i have to call above view in another database(database name : xyz).

is it possible to call above view in xyz database ?

Neal
  • 37
  • 6
  • If you really need that, it would be better to use separate schemas in the same database. Cross-database queries are a bit cumbersome in Postgres –  Jun 08 '20 at 10:53
  • I dont want to create the separate schemas in the database, i want to call the view only, – Neal Jun 08 '20 at 10:55
  • The only way to do that is a [foreign data wrapper](https://www.postgresql.org/docs/current/ddl-foreign-data.html). But a view in the same database (different schema) would be **way** more efficient –  Jun 08 '20 at 10:58
  • there is no another option to call the view in another database – Neal Jun 08 '20 at 11:01

0 Answers0