Change a normal table to a foreign “cstore_fdw” table

﹥>﹥吖頭↗ 提交于 2019-12-24 06:48:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!