apgdiff icon indicating copy to clipboard operation
apgdiff copied to clipboard

Cannot parse string: ALTER TABLE ONLY public.mytable_partitionned ATTACH PARTITION public.mytable_2013_t1 FOR VALUES IN (...)

Open maltebrun opened this issue 2 years ago • 4 comments

Hello, I'm trying to use apgdiff v2.7.0 to compare 2 dumps generated with pg_dump from PostgreSQL 10.

One of the tables is partitionned by values.

apgdiff throw this exception :

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: ALTER TABLE ONLY public.mytable_partitionned ATTACH PARTITION public.mytable_2013_t1 FOR VALUES IN ('2013-01', '2013-02', '2013-03');
Unsupported command at position 51 '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)

Seems to be similar to gintaraskuc comment on 26 Nov 2021

Any help would by appreciated.

maltebrun avatar Mar 23 '22 08:03 maltebrun

@maltebrun I am also getting same issue. Did you find any solution for this issue? Please suggest

kamal140415 avatar Jul 26 '22 06:07 kamal140415

same for me, any solution ?

melaniemarc avatar Jul 27 '22 13:07 melaniemarc

Same problem. I used sed -i /ATTACH PARTITION/d' myname.sql to get rid of these lines, but of course this is not great...

alci63 avatar Sep 27 '22 13:09 alci63