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 ?

4
  • 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 Commented Jun 8, 2020 at 10:53
  • I dont want to create the separate schemas in the database, i want to call the view only, Commented Jun 8, 2020 at 10:55
  • The only way to do that is a foreign data wrapper. But a view in the same database (different schema) would be way more efficient Commented Jun 8, 2020 at 10:58
  • there is no another option to call the view in another database Commented Jun 8, 2020 at 11:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.