fordfrog / apgdiff

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

Unsupported command #295

Closed josdebruijn closed 1 year ago

josdebruijn commented 1 year ago

Got error when parsing a sequence: c:\Tools\apgdiff>java -jar apgdiff-2.4.jar --ignore-start-with test.sql local.sql Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: CREATE SEQUENCE public.cron_jobs_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; Unsupported command at position 45 'AS integer START' at cz.startnet.utils.pgdiff.parsers.Parser.throwUnsupportedCommand(Parser.java:390) at cz.startnet.utils.pgdiff.parsers.CreateSequenceParser.parse(CreateSequenceParser.java:80) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:183) 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 (https://github.com/fordfrog/apgdiff/files/12476907/cron.txt) .main(Main.java:39) See attached file for table definition cron.txt I have slightly different Postgresql versions: local.sql = 13.1, test.sql = 13.4

fordfrog commented 1 year ago

the latest release is 2.7 so you should try that instead. in the latest code START WITH is supported, i also tried to run apgdiff-2.7 against your cron.txt and it does not crash.

josdebruijn commented 1 year ago

Fixed, thanks!

I've downloaded from the website https://www.apgdiff.com/download.php, there the latest version is 2.4