Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserved keywords in diff causing issues #286

Open
syphernl opened this issue Oct 27, 2021 · 1 comment
Open

Reserved keywords in diff causing issues #286

syphernl opened this issue Oct 27, 2021 · 1 comment

Comments

@syphernl
Copy link

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.

@bochove
Copy link

bochove commented Nov 9, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants