–报错
[postgres@localhost bin]$ pg_bulkload -i /home/postgres/bulk_asher.txt -O tb_asher \
-l /home/postgres/tb_asher_output.log -P /home/postgres/tb_asher_bad.txt -o “TYPE=CSV”
-o “DELIMITER=|” -d testdb -U postgres -h 127.0.0.1
NOTICE: BULK LOAD START
ERROR: query failed: ERROR: schema “pgbulkload” does not exist
LINE 1: SELECT * FROM pgbulkload.pg_bulkload($1)
^
DETAIL: query was: SELECT * FROM pgbulkload.pg_bulkload($1)
–分析
postgres-# \dn
List of schemas
Name | Owner
------------±---------
pgbulkload | postgres
public | postgres
(2 rows)
postgres-# \df pgbulkload.*
List of functions
Schema | Name | Result data type | Argument data types
| Type
------------±------------±-----------------±-------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------±-----
pgbulkload | pg_bulkload | record | options text[], OUT skip bigint, OUT count bigint, OUT parse_errors bigint, OUT duplicate_new bigint, OUT duplicate_old b
igint, OUT system_time double precision, OUT user_time double precision, OUT duration double precision | func
(1 row)
postgres=# select * from pg_available_extensions where name like ‘%bulk%’;
name | default_version | installed_version | comment
-------------±----------------±------------------±----------------------------------------------------------------
pg_bulkload | 3.1.20 | 3.1.20 | pg_bulkload is a high speed data loading utility for PostgreSQL
(1 row)
或
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
-------------±--------±-----------±----------------------------------------------------------------
pg_bulkload | 3.1.20 | public | pg_bulkload is a high speed data loading utility for PostgreSQL
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
walminer | 3.0 | public | analyse wal to SQL
