Re: JDBC-94: "Multiple resultsets were returned by query" in query end with "; "

Поиск
Список
Период
Сортировка
От Christopher BROWN
Тема Re: JDBC-94: "Multiple resultsets were returned by query" in query end with "; "
Дата
Msg-id CAHL_zcOUvRFBAttQSnRiOPqk8RFocq-dCMO3FOyrJ1OUZyQh-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JDBC-94: "Multiple resultsets were returned by query" in query end with "; "  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: JDBC-94: "Multiple resultsets were returned by query" in query end with "; "
Список pgsql-jdbc
Hello,

Developers that use the driver via a framework (open-source, in-house) might not be in a position to change SQL, compared with developers that are able to modify hand-written SQL, so it's probably best to tolerate it by discarding any trailing semi-colon (with or without any trailing whitespace) in the parser.

I've also encountered coding practices (coding-style "standards") where semi-colons are expected (some people just love terminating all statements, not just Java, with semi-colons, even when it's not strictly necessary (e.g.: JavaScript).

So, my preference would be to maintain backwards-compatibility for others, even if I don't have such an issue myself.

--
Christopher


On 7 October 2015 at 14:34, Dave Cramer <pg@fastcrypt.com> wrote:
This is a very good question, but lots of people cut and paste SQL into code ... sometimes the ; gets in there.

Behaviour of previous version is important, but in this case It may not be justified.

Anyone else have an opinion ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 7 October 2015 at 08:30, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
I wonder why pgjdbc would want to silently ignore that user error?
Is "behavior of previous version" a sole justification?

I've drafted https://github.com/pgjdbc/pgjdbc/pull/386 to cover that.

Vladimir


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: JDBC-94: "Multiple resultsets were returned by query" in query end with "; "
Следующее
От: Leonardo Frittelli
Дата:
Сообщение: Connection terminated by the server causes deadlock in jdbc client side connection