jdbc : postgres and quoted column names
Is there any way to determine in JDBC that a column or table has bee开发者_Python百科n created using "" notation? The metadata get columns does not seem to return such information.
PS: our customer model has been unfortunately created in such a way :-(
If the column name is returned in mixed case or all upper then it has been created using quotes.
So if columnName.equals(columnName.toLowerCase()) == true
then no quotes were used. Or to be more prices: no quotes are needed.
Note that this is Postgres specific. Other databases store unquoted names in uppercase, some store them "as-is" without requiring quotes.
精彩评论