问题
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