CREATE ROLE jlmaroto LOGIN PASSWORD 'a1c2b3d4';
CREATE ROLE lrlopez LOGIN PASSWORD 'b3a2d1c4';

CREATE ROLE editor;
CREATE ROLE lector;

GRANT lector TO editor;

GRANT editor TO jlmaroto;
GRANT lector TO lrlopez;

\c alquiler

GRANT SELECT ON ALL TABLES IN SCHEMA PUBLIC TO lector;

GRANT INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA PUBLIC TO editor;

GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA PUBLIC TO editor;