# F031-03: GRANT statement

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_01 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_01;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_01 TO ROLE_F031_03_01_01

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_02 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_02;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_02 TO ROLE_F031_03_01_02 GRANTED BY CURRENT_ROLE

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_03 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_03;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_03 TO ROLE_F031_03_01_03 GRANTED BY CURRENT_USER

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_04 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_04;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_04 TO ROLE_F031_03_01_04 WITH GRANT OPTION

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_05 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_05;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_05 TO ROLE_F031_03_01_05 WITH GRANT OPTION GRANTED BY CURRENT_ROLE

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_01_06 ( A INTEGER );
CREATE ROLE ROLE_F031_03_01_06;
GRANT ALL PRIVILEGES ON TABLE_F031_03_01_06 TO ROLE_F031_03_01_06 WITH GRANT OPTION GRANTED BY CURRENT_USER

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_02_01 ( A INTEGER );
CREATE ROLE ROLE_F031_03_02_01;
GRANT ALL PRIVILEGES ON TABLE_F031_03_02_01 TO ROLE_F031_03_02_01 , ROLE_F031_03_02_01

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_01 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_01;
GRANT DELETE ON TABLE_F031_03_03_01 TO ROLE_F031_03_03_01

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_02 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_02;
GRANT INSERT ( A ) ON TABLE_F031_03_03_02 TO ROLE_F031_03_03_02

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_03 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_03;
GRANT INSERT ON TABLE_F031_03_03_03 TO ROLE_F031_03_03_03

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_04 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_04;
GRANT REFERENCES ( A ) ON TABLE_F031_03_03_04 TO ROLE_F031_03_03_04

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_05 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_05;
GRANT REFERENCES ON TABLE_F031_03_03_05 TO ROLE_F031_03_03_05

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_06 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_06;
GRANT SELECT ( A ) ON TABLE_F031_03_03_06 TO ROLE_F031_03_03_06

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_07 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_07;
GRANT SELECT ON TABLE_F031_03_03_07 TO ROLE_F031_03_03_07

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_08 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_08;
GRANT TRIGGER ON TABLE_F031_03_03_08 TO ROLE_F031_03_03_08

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_09 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_09;
GRANT UNDER ON TABLE_F031_03_03_09 TO ROLE_F031_03_03_09

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_10 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_10;
GRANT UPDATE ( A ) ON TABLE_F031_03_03_10 TO ROLE_F031_03_03_10

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_03_11 ( A INTEGER );
CREATE ROLE ROLE_F031_03_03_11;
GRANT UPDATE ON TABLE_F031_03_03_11 TO ROLE_F031_03_03_11

onlyif Postgres
onlyif Postgres
statement ok
CREATE SCHEMA TABLE_F031_03_04_01;
CREATE ROLE ROLE_F031_03_04_01;
GRANT EXECUTE ON TABLE_F031_03_04_01 TO ROLE_F031_03_04_01

onlyif Postgres
onlyif Postgres
statement ok
CREATE SCHEMA TABLE_F031_03_04_02;
CREATE ROLE ROLE_F031_03_04_02;
GRANT USAGE ON TABLE_F031_03_04_02 TO ROLE_F031_03_04_02

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_05_01 ( A INTEGER );
CREATE ROLE ROLE_F031_03_05_01;
GRANT ALL PRIVILEGES ON TABLE TABLE_F031_03_05_01 TO ROLE_F031_03_05_01

onlyif Postgres
statement ok
CREATE TABLE TABLE_F031_03_05_02 ( A INTEGER );
CREATE ROLE ROLE_F031_03_05_02;
GRANT ALL PRIVILEGES ON TABLE_F031_03_05_02 TO ROLE_F031_03_05_02

onlyif Postgres
statement ok
CREATE DOMAIN DOMAIN1 AS INT;
CREATE ROLE ROLE_F031_03_06_01;
GRANT ALL PRIVILEGES ON DOMAIN DOMAIN1 TO ROLE_F031_03_06_01

onlyif Postgres
statement ok
CREATE COLLATION COLLATION1 FROM 'de_DE';
CREATE ROLE ROLE_F031_03_07_01;
GRANT ALL PRIVILEGES ON COLLATION COLLATION1 TO ROLE_F031_03_07_01

onlyif Postgres
# (UNSUPPORTED: issue 1) statement ok
# CREATE CHARACTER SET CHARACTERSET1;
# CREATE ROLE ROLE_F031_03_08_01;
# GRANT ALL PRIVILEGES ON CHARACTER SET CHARACTERSET1 TO ROLE_F031_03_08_01


onlyif Postgres
statement ok
CREATE TRANSLATION TRANSLATION1;
CREATE ROLE ROLE_F031_03_09_01;
GRANT ALL PRIVILEGES ON TRANSLATION TRANSLATION1 TO ROLE_F031_03_09_01

onlyif Postgres
onlyif Postgres
statement ok
CREATE TYPE TYPE1;
CREATE ROLE ROLE_F031_03_10_01;
GRANT ALL PRIVILEGES ON TYPE TYPE1 TO ROLE_F031_03_10_01

onlyif Postgres
statement ok
CREATE SEQUENCE SEQUENCE1;
CREATE ROLE ROLE_F031_03_11_01;
GRANT ALL PRIVILEGES ON SEQUENCE SEQUENCE1 TO ROLE_F031_03_11_01

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_01;
GRANT ALL PRIVILEGES ON CONSTRUCTOR METHOD BAR FOR BAZ TO ROLE_F031_03_12_01

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_02;
GRANT ALL PRIVILEGES ON CONSTRUCTOR METHOD BAR TO ROLE_F031_03_12_02

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_03;
GRANT ALL PRIVILEGES ON FUNCTION BAR FOR BAZ TO ROLE_F031_03_12_03

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_04;
GRANT ALL PRIVILEGES ON FUNCTION BAR TO ROLE_F031_03_12_04

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_05;
GRANT ALL PRIVILEGES ON INSTANCE METHOD BAR FOR BAZ TO ROLE_F031_03_12_05

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_06;
GRANT ALL PRIVILEGES ON INSTANCE METHOD BAR TO ROLE_F031_03_12_06

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_07;
GRANT ALL PRIVILEGES ON METHOD BAR FOR BAZ TO ROLE_F031_03_12_07

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_08;
GRANT ALL PRIVILEGES ON METHOD BAR TO ROLE_F031_03_12_08

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_09;
GRANT ALL PRIVILEGES ON PROCEDURE BAR FOR BAZ TO ROLE_F031_03_12_09

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_10;
GRANT ALL PRIVILEGES ON PROCEDURE BAR TO ROLE_F031_03_12_10

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_11;
GRANT ALL PRIVILEGES ON ROUTINE BAR FOR BAZ TO ROLE_F031_03_12_11

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_12;
GRANT ALL PRIVILEGES ON ROUTINE BAR TO ROLE_F031_03_12_12

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_13;
GRANT ALL PRIVILEGES ON SPECIFIC CONSTRUCTOR METHOD FOO TO ROLE_F031_03_12_13

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_14;
GRANT ALL PRIVILEGES ON SPECIFIC FUNCTION FOO TO ROLE_F031_03_12_14

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_15;
GRANT ALL PRIVILEGES ON SPECIFIC INSTANCE METHOD FOO TO ROLE_F031_03_12_15

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_16;
GRANT ALL PRIVILEGES ON SPECIFIC METHOD FOO TO ROLE_F031_03_12_16

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_17;
GRANT ALL PRIVILEGES ON SPECIFIC PROCEDURE FOO TO ROLE_F031_03_12_17

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_18;
GRANT ALL PRIVILEGES ON SPECIFIC ROUTINE FOO TO ROLE_F031_03_12_18

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_19;
GRANT ALL PRIVILEGES ON SPECIFIC STATIC METHOD FOO TO ROLE_F031_03_12_19

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_20;
GRANT ALL PRIVILEGES ON STATIC METHOD BAR FOR BAZ TO ROLE_F031_03_12_20

onlyif Postgres
statement ok
CREATE ROLE ROLE_F031_03_12_21;
GRANT ALL PRIVILEGES ON STATIC METHOD BAR TO ROLE_F031_03_12_21
