apgdiff icon indicating copy to clipboard operation
apgdiff copied to clipboard

Security barrier views are not supported

Open kostiantyn-nemchenko opened this issue 7 years ago • 2 comments

It seems that apgdiff-2.4 does not support views with security_barrier flag.

Steps to create view: CREATE TABLE t AS SELECT n AS id, 'secret'||n AS secret FROM generate_series(1,10) n; CREATE VIEW t_even_sb WITH (security_barrier) AS SELECT * FROM t WHERE id % 2 = 0;

Results from apgdiff:

Exception in thread "main" cz.startnet.utils.pgdiff.parsers.ParserException: Cannot parse string: CREATE VIEW t_even_sb WITH (security_barrier='true') AS SELECT t.id, t.secret FROM t WHERE ((t.id % 2) = 0); Expected AS at position 23 'WITH (security_barri' at cz.startnet.utils.pgdiff.parsers.Parser.expect(Parser.java:86) at cz.startnet.utils.pgdiff.parsers.Parser.expect(Parser.java:47) at cz.startnet.utils.pgdiff.parsers.CreateViewParser.parse(CreateViewParser.java:49) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:190) at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:236) at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:33) at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

kostiantyn-nemchenko avatar Jun 07 '17 14:06 kostiantyn-nemchenko

Test with this jar diff.zip

jalissonmello avatar Nov 24 '18 14:11 jalissonmello

Now in release the folder its the jar version 2.6.0

jalissonmello avatar Feb 21 '19 23:02 jalissonmello