Closed steve-chavez closed 5 years ago
Added another fix for a couple of errors I found on table/view privileges on specific columns:
-- original.sql
create table items(id integer, name text);
create view items_view as select id from items;
-- new.sql
create table items(id integer, name text);
create view items_view as select id from items;
grant select(id, name), insert(name), update on items_view to admin;
-- diff.sql
GRANT SELECT, INSERT, UPDATE ON TABLE items_view TO admin;
i.e. When having a last privilege without cols the previous col privileges get ignored.
-- original.sql
create table items(id integer, name text);
create view items_view as select id from items;
-- new.sql
create table items(id integer, name text);
create view items_view as select id from items;
grant select(id, name), insert, update(name) on items_view to admin;
-- diff.sql
-- gives java.lang.NullPointerException
When having a privilege without cols followed by a privilege with cols the exception is produced.
Closing, coz merged in #245
The diffing of sequence privileges had
GRANT ON/REVOKE ALL ON
onTABLE
instead ofSEQUENCE
.ALTER .. OWNER
was only working for tables and not views.