开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜