Re: Errors using JDBC batchUpdate with plpgsql function

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Nanker Phelge <n(dot)phelge01(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Errors using JDBC batchUpdate with plpgsql function
Date: 2015-05-04 02:16:12
Message-ID: CAKFQuwbjNMvSqOTktr=32KjdtiqmB1c-LwxEEio4_by2a71Spw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, May 3, 2015 at 2:33 PM, Nanker Phelge <n(dot)phelge01(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2015-05-04 07:01:43 Re: [HACKERS] optimization join on random value
Previous Message Jim Nasby 2015-05-04 02:10:02 Re: [HACKERS] optimization join on random value