| От | Thomas Kellerer |
|---|---|
| Тема | How to retrieve column names for tables with underscores |
| Дата | |
| Msg-id | imfg0q$481$1@dough.gmane.org обсуждение исходный текст |
| Ответы |
Re: How to retrieve column names for tables with underscores
|
| Список | pgsql-jdbc |
Hi,
this is probably more of a generic JDBC question, but since I'm trying to solve this with Postgres I'm posting it here:
I have two tables
table1_ (yes there is an underscore at the end)
table12
Now when I try to retrieve the columns for "table_" the columns of table12 are also returned because the table name
parameterfor DatabaseMetaData.getColumns() is used as a LIKE expression.
Is there a way (preferrably standard JDBC) to avoid the LIKE evaluation with the getColumns() call e.g. by specifying
anescape character?. I tried to replace the underscore with the standard backslash escape ("table1\_") but that didn't
work.
Or is the only reliable way to check the value of the returned TABLE_NAME whether it matches my input value?
Thanks
Thomas
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера