On 10/26/23 03:56, Shaozhong SHI wrote:
> If a PgAmin view is created and tables it queries are missing, what will
> happen?
Easy enough to test:
create view test_vw as select * from non_existent_table;
ERROR: relation "non_existent_table" does not exist
LINE 1: create view test_vw as select * from non_existent_table;
>
> If a PdAmin view is created, and it may take 20 hours to complete, what
> will happen?
Docs:
https://www.postgresql.org/docs/current/sql-createview.html
"CREATE VIEW defines a view of a query. The view is not physically
materialized. Instead, the query is run every time the view is
referenced in a query."
>
> Would views automatically run, when you start the PgAmin?
See above. The view query will not execute until specifically asked for
and nothing I have seen in my limited use of pgAdmin does that
automatically.
>
> Regards,
>
> David
--
Adrian Klaver
adrian.klaver@aklaver.com