Re: transaction and insert

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: transaction and insert
Дата
Msg-id CAKFQuwafx_Pio-LgS-+p8pv4oLG37zPuNO4vDvurcrSGvLo5kQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: transaction and insert  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On Wed, Jul 17, 2019 at 12:24 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
                                                rows = stmt.executeUpdate(sqlUpdateAddSubTotal + sqlInsertAddRecord);

Also, after solving your immediate concern you should learn about SQL Injection risks and using preparedStatement in Java to mitigate that risk.  The style you are using here is simply bad code.

That fact that you don't re-throw the SQLException is also bad (can't tell if that is mock-up code or live production, but given other observations I'm going to assume the later).

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: transaction and insert
Следующее
От: Vladimir Ryabtsev
Дата:
Сообщение: User mapping: view over a foreign table