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

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

Open
maltebrun opened this issue Mar 23, 2022 · 3 comments

Comments

@maltebrun
Copy link

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.

@kamal140415
Copy link

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

@melaniemarc
Copy link

same for me, any solution ?

@alci63
Copy link

alci63 commented Sep 27, 2022

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

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

4 participants