H2 and PostgreSQL compatibility mode limitations

Deadly 提交于 2019-12-12 13:31:37

问题


I'm using H2 database as in-memory database for tests where PostgreSQL is being used in production. This setup works fine except some minor differences between the two. One I'm concerned about right now is the 64 length limit for identifiers in PostgreSQL. H2 seems to support sort of unlimited identifiers length which is causing troubles for me because I have dynamically generated schemas and once the column/table/schema identifiers are longer than 64 characters it works in H2 but the problem is revealed only after using PostgreSQL in some real environment.

I found the PostgreSQL compatibility mode for H2 but it doesn't seem to address this particular thing.

So the question:

Any idea how I can force H2 to treat identifiers in the same way as PosgreSQL does? I.e. if identifier is longer than 64 characters it will be truncated to 64 characters only.

来源:https://stackoverflow.com/questions/38869723/h2-and-postgresql-compatibility-mode-limitations

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!