apgdiff icon indicating copy to clipboard operation
apgdiff copied to clipboard

Reserved keywords in diff causing issues

Open syphernl opened this issue 3 years ago • 1 comments

It appears that quoted reserved keywords used as column names aren't handled properly by apgdiff:

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot find column '"time"' in table 'transaction'

This happens in 2.7.0. In 2.6.0 it would result in a NullPointerException.

syphernl avatar Oct 27 '21 06:10 syphernl

The sql: GRANT UPDATE ("time") ON x.transaction TO x; leads to a pg_dump containing: GRANT UPDATE("time") ON TABLE x.transaction TO x;

pg_diff then can't find this column, but when the dump is changed to: GRANT UPDATE(time) ON TABLE x.transaction TO x; there is no longer an issue, the problem is that this is not how it is dumped. The dumped line is correct, the column does exist.

bochove avatar Nov 09 '21 14:11 bochove