Re: Unable to prepare a statement when the object names contain more than one $ symbol
В списке pgsql-jdbc по дате отправления:
| От | Kris Jurka |
|---|---|
| Тема | Re: Unable to prepare a statement when the object names contain more than one $ symbol |
| Дата | |
| Msg-id | Pine.BSO.4.64.0707091229520.10973@leary.csoft.net обсуждение |
| Ответ на | Unable to prepare a statement when the object names contain more than one $ symbol (Altaf Malik <mmalik_altaf@yahoo.com>) |
| Ответы |
Re: Unable to prepare a statement when the object names contain more than one $ symbol
|
| Список | pgsql-jdbc |
On Mon, 9 Jul 2007, Altaf Malik wrote:
> I have a table with two columns of type varchar and the table name
> contains two dollars. I am unable to prepare a statement for this table.
> Here is the code:
>
> PreparedStatement pstmt = con.prepareStatement("insert into a$b$c
> values( ? , ?)");
> Exception in thread "main" org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns:
0.
This is a bug in dollar quote parsing. It assumes that any potential
dollar quote start will have an end tag. When it doesn't find the end it
reports the end of the query, so the driver ends up skipping over the "?"
parameters.
Kris Jurka
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера