从 PostgreSQL 转储中恢复列
Restore column from PostgreSQL dump
是否可以从 PostgreSQL 转储中恢复特定列?我知道可以指定要恢复的 table,但是这个 table?
中的列呢?
正如@wildpasser 在评论中提到的,最好的方法如下:
- 需要导入 table 使用不同的 table 名称(特定的 table 可以使用
psql COPY 'different_table_name' FROM 'file_name'
导入
- 从
different_table_name
更新 table 的所需列
- 放弃
different_table_name
是否可以从 PostgreSQL 转储中恢复特定列?我知道可以指定要恢复的 table,但是这个 table?
中的列呢?正如@wildpasser 在评论中提到的,最好的方法如下:
- 需要导入 table 使用不同的 table 名称(特定的 table 可以使用
psql COPY 'different_table_name' FROM 'file_name'
导入
- 从
different_table_name
更新 table 的所需列
- 放弃
different_table_name