错误:csvread函数(未知)不存在飞行路线迁移

时间:2018-07-10 07:02:23

标签: sql csv import flyway dbmigrate

我尝试使用flywayDB开源-迁移功能,并尝试从CSV文件创建表,但出现错误:

Migration V1__Add_new_tables.sql failed
---------------------------------------
SQL State  : 42883
Error Code : 0
Message    : ERROR: function csvread(unknown) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 48
Location   : /Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql (/Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql)
Line       : 64
Statement  : CREATE TABLE public.mutations AS SELECT * FROM CSVREAD('mutation.csv')

当我尝试上传此内容时:

CREATE TABLE public.mutations
(
    id integer,
    gene_id integer,
    name text COLLATE pg_catalog."default",
    ...
) as select * from CSVREAD ('mutation.csv');

0 个答案:

没有答案