fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
353 stars 138 forks source link

Partition by range not supported in 2.6.0 #261

Open jayverizon opened 4 years ago

jayverizon commented 4 years ago

First of all, I want to thank you for your efforts on this particular utility. I have a fairly complex schema that I'm trying to compare by environments, and I today downloaded 2.6.0, but it still complains about this syntax. Here is the specific error:

Unsupported command at position 1,250 'PARTITION BY RANGE (' at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parse r.java:403) at cz.startnet.utils.pgdiff.parsers.CreateTableParser.parse(CreateTableP arser.java:103) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDum pLoader.java:235) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDum pLoader.java:311) at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:35) at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

jalissonmello commented 2 years ago

Can you help testing ? There is 2.6.1 jar on https://github.com/jalissonmello/apgdiff/tree/develop/releases

Maybe your problem was resolved.

rokcarl commented 2 years ago

Had the same problem, downloaded 2.7.0 and the problem was gone, thank you.

I now have a different problem, but it's probably out of scope for this issue:

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: ALTER TABLE ONLY public.call_high_csat ATTACH PARTITION public.call_high_csat2017_01 FOR VALUES FROM ('2016-12-31 21:00:00+00') TO ('2017-01-31 21:00:00+00');
Unsupported command at position 40 'ATTACH PARTITION pub'
    at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parser.java:413)
    at cz.startnet.utils.pgdiff.parsers.AlterRelationParser.parse(AlterRelationParser.java:119)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:248)
    at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:322)
    at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:35)
    at cz.startnet.utils.pgdiff.Main.main(Main.java:39)
mattatwork26 commented 2 years ago

@rokcarl did you find a work-around

rokcarl commented 2 years ago

Not that I remember.

kamal140415 commented 2 years ago

@rokcarl I am also getting the same issue. Can you please tell me if you find any solution or work around for this issue?