问题
Is it possible to change a normal table to a foreign table in Postgresql?
At least, if it's not possible, can I copy data from a normal table to a foreign table?
回答1:
https://github.com/citusdata/cstore_fdw:
To load or append data into a cstore table, you have two options:
- You can use the COPY command to load or append data from a file, a program, or STDIN.
- You can use the INSERT INTO cstore_table SELECT ... syntax to load or append data from another table.
so follow the example: create foreign table and insert data to it from your local table.
来源:https://stackoverflow.com/questions/44064004/change-a-normal-table-to-a-foreign-cstore-fdw-table