pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Bulk_insert in postgresql like Microsoft SQL server
Date: Thu, 20 Dec 2018 14:25:49 +0100
Message-ID: <f3c0a73a-ddce-010d-9088-4dee82ff711b@gmx.net> (raw )
In-Reply-To: <CAE+tJY9JaLKt4XsXSS02qfGa2vOB6-rmN2dE=95jM4NYcW4KLQ@mail.gmail.com >
References: <CAE+tJY9xX=Yu50dD45xCz5auKVAgBv_hZrdGK_5koQkzW9jj-g@mail.gmail.com >
<CAKFQuwYjJ2svQ7hFbtJXY5+KC=wD3hqyfpeD5qLvyq=U8XaRjg@mail.gmail.com >
<CAE+tJY9JaLKt4XsXSS02qfGa2vOB6-rmN2dE=95jM4NYcW4KLQ@mail.gmail.com >
Devendra Yadav schrieb am 19.12.2018 um 18:58:
>> On Wed, Dec 19, 2018 at 10:29 AM Devendra Yadav <devendra.857@gmail.com <mailto:devendra.857@gmail.com>> 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
view thread (9+ messages) latest in thread
Message-ID: <f3c0a73a-ddce-010d-9088-4dee82ff711b@gmx.net>
Permalink: ../f3c0a73a-ddce-010d-9088-4dee82ff711b@gmx.net/
Also on: postgresql.org/message-id/f3c0a73a-ddce-010d-9088-4dee82ff711b@gmx.net
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: spam_eater@gmx.net, pgsql-admin@lists.postgresql.org
Subject: Re: Bulk_insert in postgresql like Microsoft SQL server
In-Reply-To: <f3c0a73a-ddce-010d-9088-4dee82ff711b@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox