Re: driver fails to handle strings in query statements properly
В списке pgsql-jdbc по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: driver fails to handle strings in query statements properly |
| Дата | |
| Msg-id | 19724.1002060967@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: driver fails to handle strings in query statements properly ("Dave Cramer" <Dave@micro-automation.net>) |
| Ответы |
Re: driver fails to handle strings in query statements properly
|
| Список | pgsql-jdbc |
"Dave Cramer" <Dave@micro-automation.net> writes:
> I tried it on a table which id was an int
> Using "select 'id' as xxx from ..." Returns xxx as an unknown type
> Using "select id as xxx from... " returns xxx as an int
> I have no idea how the backend handles this, but if it can figure it out
> in one instance why can't it figure it out when I put single quotes
> around it?
Uh ... when you put single quotes around it, it's a literal, not
a column reference ... and whatever one might think about 'id',
it's certainly not an integer.
regards, tom lane
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера