apgdiff
apgdiff copied to clipboard
not supported SQL statement "REPLICA IDENTITY NOTHING"
I have an ALTER TABLE statement in my SQL dump file: ALTER TABLE ONLY v_device_list REPLICA IDENTITY NOTHING;
I dont exactly know what is "REPLICA IDENTITY NOTHING". This cause the fallowing exception:
Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: ALTER TABLE ONLY v_device_list REPLICA IDENTITY NOTHING; Unsupported command at position 32 'REPLICA IDENTITY NOT' at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parser.java:390) at cz.startnet.utils.pgdiff.parsers.AlterTableParser.parse(AlterTableParser.java:106) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:180) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:236) at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:29) at cz.startnet.utils.pgdiff.Main.main(Main.java:39)
My solution right now is to comment out this SQL line from the dump file.
Here is a short discussion "why does pg_diff ever export a schema as a table" http://comments.gmane.org/gmane.comp.db.postgresql.bugs/39679
This is something that's bitten me for a while. It's still an issue with the develop branch.