Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZyL0-0008Kz-Oz for pgsql-admin@arkaria.postgresql.org; Thu, 20 Dec 2018 13:26:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZyKw-0000GQ-SV for pgsql-admin@arkaria.postgresql.org; Thu, 20 Dec 2018 13:26:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZyKw-0000GI-Hw for pgsql-admin@lists.postgresql.org; Thu, 20 Dec 2018 13:26:02 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZyKp-0002zD-4N for pgsql-admin@lists.postgresql.org; Thu, 20 Dec 2018 13:26:01 +0000 Received: from [10.1.35.161] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1M3UhQ-1gZQMv2T2Y-000g60 for ; Thu, 20 Dec 2018 14:25:51 +0100 Subject: Re: Bulk_insert in postgresql like Microsoft SQL server To: pgsql-admin@lists.postgresql.org Newsgroups: gmane.comp.db.postgresql.admin References: From: Thomas Kellerer Message-ID: Date: Thu, 20 Dec 2018 14:25:49 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:dUs+lUicW/jBpml43vqa4qvfMSBzKjj/sR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subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Devendra Yadav schrieb am 19.12.2018 um 18:58: >> On Wed, Dec 19, 2018 at 10:29 AM Devendra Yadav > wrote: >> > But the case is that, for it to happen it needs superuser permission which >> >> It only requires superuser permission if you ask the server to COPY a >> file from the local filesystem.  Developers and programs should be >> using client libraries and feeding the data to be copied (in or out) >> to the server via the connection (which, for the server, is a >> stdin/stdout stream).  psql provides this via \copy - other libraries >> have their own methods. > Thanks for the information David. I'll check that. We have most of > our applications in Java and .net, if you can please highlight on > these ? With JDBC you can use the CopyManager API together with a "COPY FROM STDIN" statement. https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html There are some examples on Stackoverflow: https://stackoverflow.com/questions/6958965 https://stackoverflow.com/questions/46988855