导入所有列

最近更新时间: 2025-02-18 16:02:00

  • 复制
    复制成功
postgres=# \! cat  /data/pgxz/t.txt              
1       TDSQL PG   \N      7
2       pg'",      xc%  2017-10-28 18:24:05.643102      3
3       pgxz    2017-10-28 18:24:05.645691      \N
postgres=# truncate table t;
TRUNCATE TABLE
postgres=# copy t from '/data/pgxz/t.txt';
COPY 3
postgres=# select * from t;
 f1 |       f2       |             f3             | f4 
----+----------------+----------------------------+----
  1 | TDSQL PG       |                            |  7
  2 | pg'",      xc% | 2017-10-28 18:24:05.643102 |  3
  3 | pgxz           | 2017-10-28 18:24:05.645691 |   
(3 rows)