Re: Errors using JDBC batchUpdate with plpgsql function - Mailing list pgsql-general

From David G. Johnston
Subject Re: Errors using JDBC batchUpdate with plpgsql function
Date
Msg-id CAKFQuwbjNMvSqOTktr=32KjdtiqmB1c-LwxEEio4_by2a71Spw@mail.gmail.com
Whole thread Raw
In response to Errors using JDBC batchUpdate with plpgsql function  (Nanker Phelge <n.phelge01@gmail.com>)
List pgsql-general
On Sun, May 3, 2015 at 2:33 PM, Nanker Phelge <n.phelge01@gmail.com> wrote:
inner ex 2 =A result was returned when none was expected.


​I don't know what is or is not allowed by JDBC but it is reasonable to assume that you cannot create batches of SELECT statements.  The intent of batching is to repeatedly execute the same INSERT​ statement multiple times while using different values for parameters.

I would suggest probably writing INSERT onto a temporary table and then writing a plpgsql function that would then process said temporary table.

David J.

pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [HACKERS] optimization join on random value
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [HACKERS] optimization join on random value