Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jS1Jt-0007YQ-LH for pgsql-general@arkaria.postgresql.org; Fri, 24 Apr 2020 16:36:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jS1Js-0001ce-Il for pgsql-general@arkaria.postgresql.org; Fri, 24 Apr 2020 16:36:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jS1Js-0001ZO-B4 for pgsql-general@lists.postgresql.org; Fri, 24 Apr 2020 16:36:52 +0000 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jS1Jq-00007x-0Z for pgsql-general@lists.postgresql.org; Fri, 24 Apr 2020 16:36:51 +0000 Received: by mail-ot1-x341.google.com with SMTP id e20so13401903otk.12 for ; Fri, 24 Apr 2020 09:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=Prxmo6BWwjvc5mAWBp1KjRXfeI5prpUCEJ0HjM7Jqk0=; b=jsjfRIxG+2UWa2Jj+UhIb1px9KuZaC3OjBFty6DIYZOMGztOydj26BfkCpvGi3AoAt A+25ijKCBJ0Ktw60sZMYhQLeAFAM5rH+Pxav4GoknXcqxAX46Tfq8cLRTLEQ5NuIosNQ BK2IfwnC7rgtxLkDqa9FZez5umtODcL2jliv7RNbnDqoUrCnb9gbtu1ls9BL0CSBCdoB WFDknZZIDD2WioqQzczFjKOJyCxksAsOlwwzFSMZ6drLDIHlWsFsDotBPzUInUXYgqv2 lZFA6Mx2LuNFVS3MbkIxstV9/ZQpa3gWU95pWDGfU0WJWGZT/MDXaM+4yxT6xiuAfFSR rgOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Prxmo6BWwjvc5mAWBp1KjRXfeI5prpUCEJ0HjM7Jqk0=; b=pteTybC2LYFzPd8jO1fDvD/oTVVnASH7WQsSEjPClybkSyKubDrY6jllJqsYK2yldv WhPbyZ1GzvmO1XgxTqIY0WVguwIcC/bQiqya/NJkgAvBxR+SVZUDhtIqsbxWvBh8ZZn9 vqDm9R4Lgf4+uf/zuWY6e2HM06UibaD/mN7anAYqxqHYis+86e+DwXcZPgsr02qepMw1 upwCmzBTLjGYB25h87y9tCtdXoFWgt5yMdMUwxZSpEDu4Z/8MH6izxjHgrrrvGekdQTj OJ0NDgQW0OmjBv1kVZzF0KeApeOrZFqAzfDX3k3IllCXPuJ5dkTKiRgyUoQmyibcfg9K Sl8Q== X-Gm-Message-State: AGi0PuaAl+nCcgeG/zHGCoGMjyI8l9NDL8Nh5vS/pX+HBVSfDmvwT6c6 +VbLhChmcvUgW7/jVoUX/mzbMyD43Is= X-Google-Smtp-Source: APiQypJCgCmAhNLXMQlWZNdS8o9Nce53VjVQF3IeejnvwcC7D0d+bhHT1W9ry3oPfU2Hz+f/uG2wqg== X-Received: by 2002:a9d:6315:: with SMTP id q21mr8700217otk.16.1587746208996; Fri, 24 Apr 2020 09:36:48 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id b6sm1618062otp.31.2020.04.24.09.36.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 09:36:48 -0700 (PDT) Subject: Re: psql \copy To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <21c97985-7126-f71a-ff4a-da6e10e9ab76@gmail.com> Date: Fri, 24 Apr 2020 11:36:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk You might want to investigate pg_bulkload for this activity. On 4/24/20 10:55 AM, Steve Clark wrote: > Hello, > > I am using psql to copy data extracted from an InfluxDB in csv format into > postgresql. > I have a key field on the time field which I have defined as a bigint > since the time I get > from InfluxDB is an epoch time. > > My question is does psql abort the copy if it hits a duplicate key, or > does it keep processing? > -- Angular momentum makes the world go 'round.