pg_dump:
pg_dump -a -t tbl_test "host=127.0.0.1 hostaddr=127.0.0.1 port=5432 user=postgres password=123456 dbname=postgres" > /userdir/tbl_data
a 参数是表示只导出数据,其他的额外信息不需要,该参数也可去掉
psql:
psql --command "select * from tbl_test;" "host=127.0.0.1 hostaddr=127.0.0.1 port=5432 user=postgres password=123456 dbname=postgres"
2021-12-22 11:08:03
351B
但
1