apgdiff icon indicating copy to clipboard operation
apgdiff copied to clipboard

not supported SQL statement "REPLICA IDENTITY NOTHING"

Open misicsaba opened this issue 9 years ago • 2 comments

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.

misicsaba avatar Sep 26 '15 15:09 misicsaba

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

vektor330 avatar Jun 17 '16 14:06 vektor330

This is something that's bitten me for a while. It's still an issue with the develop branch.

Tostino avatar Sep 04 '17 20:09 Tostino