Strange things with Java 8

Today I ran the “usual” things I did hundreds of times, and I had a strange “bug”. I’m not sure whether it’s a bug in liquibase or in Java 8, but this is what happened:

liquibase update against a RedShift DB displayed the same error we had in http://forum.liquibase.org/topic/redshift-support , because it doesn’t add the escaping double-quotes around the reserved keyword of RedShift: TAG

Took us some time, but finally we found out that the fix was to run liquibase with Java 7 instead of 8.

That is very strange. The TAG reserved word is included in redshift extension directly, so it’s not a driver version difference. It is just doing a “redshiftReservedWords.contains(tableName.toUpperCase())” call.

Was it just TAG that was the problem? 

Nathan

It’s odd Java 8 would make a difference with the logic knowing TAG is a keyword. I wonder if it’s a problem with java 8 not finding the redshift extension correctly? 

I assume there isn’t a difference in your classpath between java 8 and 7. Do you notice anything in the log about finding or not finding or errors loading classes in 8 vs 7?

Nathan

This was the SQL it tried to execute:

SELECT FILENAME,AUTHOR,ID,MD5SUM, DATEEXECUTED,ORDEREXECUTED, EXECTYPE,DESCRIPTION,COMMENTS, TAG,LIQUIBASE FROM public.databasechangelog_ analytics ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC

And because it’s run on redshift, where TAG is a reserved keyword, it needs to have double-quotes. Exactly as we had the bug half a year ago.