Change a normal table to a foreign “cstore_fdw” ta

2019-09-19 03:04发布

问题:

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.