Running update uses NOW() function - not allowed

hi,
When running a liquibase update command we get an error :

Unexpected error running Liquibase: Error executing SQL UPDATE mag_metadata.databasechangeloglock SET LOCKED = TRUE, LOCKEDBY = ‘MAGTB00013769 (192.168.0.225)’, LOCKGRANTED = NOW() WHERE ID = 1 AND LOCKED = FALSE: Amazon Invalid operation: Specified types or functions (one per INFO message) not supported on Redshift tables.;

This is because the NOW() does not match the redshift table column format.
I have another install that works and that uses the GETDATE() function in place of NOW().
I do not know what the difference is with the installation / config. The drivers are the same.

Any help would be great.

What version of Liquibase, liquibase-redshift, and jdbc driver are you using?

We tried:
Liquibase 4.27
Driver:
RedshiftJDBC42-1.2.1.1001 - specified in the properties file parameter
Redshift version:
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.67305

We also tried 4.23 and I have a version working from an install in Aug 2023 but when I reinstall this it gives the same issue.

It is similar to this:
https://statics.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html
I think we are planning to try this.
I think someone also got 4.31 working.

What about the liquibase-redshift extension?

I missed this. It now works for 4.23. I will try 4.27 soon.

1 Like