Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fz0su-0001Ax-4b for pgsql-performance@arkaria.postgresql.org; Sun, 09 Sep 2018 14:40:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fz0sq-0005Ow-UN for pgsql-performance@arkaria.postgresql.org; Sun, 09 Sep 2018 14:40:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fywBj-0004WY-PP for pgsql-performance@lists.postgresql.org; Sun, 09 Sep 2018 09:39:27 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fywBh-0003m6-JJ for pgsql-performance@postgresql.org; Sun, 09 Sep 2018 09:39:27 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 3431AF0AE820 for ; Sun, 9 Sep 2018 02:39:23 -0700 (MST) Date: Sun, 9 Sep 2018 02:39:23 -0700 (MST) From: padusuma To: pgsql-performance@postgresql.org Message-ID: <1536485963039-0.post@n3.nabble.com> In-Reply-To: <32611151536479127@iva1-16f33c6a446b.qloud-c.yandex.net> References: <1536339842382-0.post@n3.nabble.com> <8736uk6eh5.fsf@gmail.com> <1536385261054-0.post@n3.nabble.com> <32611151536479127@iva1-16f33c6a446b.qloud-c.yandex.net> Subject: Re: Performance of INSERT into temporary tables using psqlODBC driver MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Sergei, >> The data to be inserted into temporary tables is obtained from one or >> more >> queries run earlier and the data is available as a vector of strings. >You can not use "insert into temp_table select /*anything you wish*/" statement? >Or even insert .. select ... returning if you need receive data to application? Unfortunately, the existing functionality in our application is in such a manner that the data returned from one or more SELECT queries is processed by server business logic and filtered, and the filtered data is then inserted into the temporary tables. This is the reason I could not use insert into ... select ... or insert ... select ... returning statements. >> If I need to use COPY FROM command, then the application would need to >> create a >> file with the data to be inserted >You can not using "copy from stdin" statement? Thank you for suggesting the usage of "copy from stdin". I am not sure how to pass the values to be inserted as input for "COPY FROM STDIN" statement from my application based on psqlODBC driver. Can someone point me to an example or suggest how to pass data from a client application to "COPY FROM STDIN" statement? Thanks. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html