| От | Thomas Kellerer |
|---|---|
| Тема | Small problem with embedded comments in a statement |
| Дата | |
| Msg-id | efaql9$jnj$1@sea.gmane.org обсуждение исходный текст |
| Ответы |
Re: Small problem with embedded comments in a statement
|
| Список | pgsql-jdbc |
Hello,
When running the following query:
String sql = "select * from table1\n" +
"--select * from table2;\n" +
"--select * from table3";
I get an error:
org.postgresql.util.PSQLException: Multiple ResultSets were returned by the query.
But as the second and third SELECT are behing a comment, they should be ignored,
right? Actually when removing the semicolon after table2, then everything works
fine.
Is this a bug in the JDBC driver, or is this intended behaviour?
Best regards
Thomas
P.S.: before you ask why I run such a SQL statement: I'm maintaining an
open-source query tool and sometimes unwanted statements are simply un-commented
from within the editor, but the application still sends the whole string that
the user supplied.
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера