avamingli commented on PR #725:
URL: https://github.com/apache/cloudberry/pull/725#issuecomment-2490843194
> Dynamic Table have all operations from Materialized Views, and it must do.
They are same as GPDB's external table and foreign table, if you have a try:
>
> ```sql
> create external table ext1;
> drop external table ext1;
> drop foreign table ext1;
> ```
>
> Both will succeed, external table is actually a foreign table.
exmaple:
```sql
CREATE READABLE EXTERNAL TABLE ext_r(id int)
LOCATION('demoprot://dynamic_table_text_file.txt')
FORMAT 'text';
CREATE EXTERNAL TABLE
gpadmin=# \d
List of relations
Schema | Name | Type | Owner | Storage
--------+-------+---------------+---------+---------
public | ext_r | foreign table | gpadmin |
(1 row)
gpadmin=# drop external table ext_r;
DROP FOREIGN TABLE
gpadmin=# CREATE READABLE EXTERNAL TABLE ext_r(id int)
LOCATION('demoprot://dynamic_table_text_file.txt')
FORMAT 'text';
CREATE EXTERNAL TABLE
gpadmin=#
gpadmin=# \d
List of relations
Schema | Name | Type | Owner | Storage
--------+-------+---------------+---------+---------
public | ext_r | foreign table | gpadmin |
(1 row)
gpadmin=# drop foreign table ext_r;
DROP FOREIGN TABLE
```
In summary, we'r doing the similar thing like external table with foreign
table, for dynamic tables and materialized views.
We provide some command for it, and all valid commands on matview should
work on dynamic tables too.
I'm not planing to copy lot's of duplicated codes from matview for just
several tiny adjustment, that's pointless and the worse is: when postgres have
some updated on matview command, we won't catch up and need copy the new
changes too.
Since they are actually the same thing, let it be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]