Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用sql命令将表数据导出到postgresql中的文件_Postgresql_Greenplum - Fatal编程技术网

如何使用sql命令将表数据导出到postgresql中的文件

如何使用sql命令将表数据导出到postgresql中的文件,postgresql,greenplum,Postgresql,Greenplum,我正在比较PostgreSQL和Greenplum的特性。要访问外部文件(如Greenplum中的平面文件),请使用externals表 1) 为了读取文件并表示为表,Greenplum具有可读的外部表,我们可以在PostgreSQL中使用外部数据包装文件_fdw实现同样的功能 2) 要将数据从表加载到文件中,greenplum具有可写的外部表。我需要一种在PostgreSQL中实现相同功能的方法,而不是复制命令或pg_dump。我需要像file_fdw这样的东西,以便可以将它们用作SQL命令并

我正在比较PostgreSQL和Greenplum的特性。要访问外部文件(如Greenplum中的平面文件),请使用externals表

1) 为了读取文件并表示为表,Greenplum具有可读的外部表,我们可以在PostgreSQL中使用外部数据包装文件_fdw实现同样的功能

2) 要将数据从表加载到文件中,greenplum具有可写的外部表。我需要一种在PostgreSQL中实现相同功能的方法,而不是复制命令或pg_dump。我需要像file_fdw这样的东西,以便可以将它们用作SQL命令并将它们合并到函数中


请注意

COPY
根本不是psql命令,它是对SQL的postgres扩展-因此它是SQL命令。很抱歉,我将编辑我的问题。我正在寻找除复制命令之外的其他可用选项您的目标是什么?您是希望替换PostgreSQL,还是替换Greenplum数据库,或者将它们一起使用?我在Greenplum中有外部表。我想知道如何在postgresql中使用相同的功能