0

我使用 docker 映像 ( docker pull ubuntu),通过 apt-get 安装了 postgresql,然后想要运行以下脚本:

LOAD CSV
     FROM 'geneset.csv' (a,b,c,d,e,f,g)
     INTO postgresql:///genedb?csv (a,b,c,d,e,f,g)

     WITH truncate,
          skip header = 1,
          fields optionally enclosed by '"',
          fields escaped by backslash-quote,
          fields terminated by '\t'

     SET client_encoding to 'latin1',
          work_mem to '80MB',
          standard_conforming_strings to 'on'

    BEFORE LOAD DO
    $$ drop table if exists csv; $$,
    $$ create table csv (
        a bigint,
        b text,
        c text,
        d text,
        e text,
        f text,
        g text
       );
  $$;

为了执行我在 shell 中键入的脚本:pgloader csv.load执行上面的代码。

不幸的是,我总是收到警告:

WARNING:
Couldn't re-execute SBCL with proper personality flags (/proc isn't mounted? setuid?)
Trying to continue anyway.
An unhandled error condition has been signalled:
   Failed to connect to pgsql at :UNIX (port 5432): The value of CL-POSTGRES::USER is NIL, which is not of type STRING.

; 
; compilation unit aborted
;   caught 1 fatal ERROR condition

我已经安装了 apt-get -y install sbcl gcl,但是错误并没有消失。有什么建议可以解决这个问题吗?我发现这个问题经常发生在 docker 图像上......


编辑:

我基本上可以设置一个 ubuntu 16.04 docker 映像并通过 apt-get 安装 postresql 和 pdgloader 吗?我的方法可以吗?我只想在图像中本地运行数据库查询...

4

0 回答 0