Test current user in task-tracker queries

release-7.4
Marco Slot 2018-11-22 01:11:11 +01:00
parent 8907ab87b4
commit 5a7e4d8a57
3 changed files with 21 additions and 21 deletions

View File

@ -93,10 +93,10 @@ SELECT count(*) FROM test WHERE id = 1;
(1 row)
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
count
-------
2
SELECT count(*), min(current_user) FROM test;
count | min
-------+-------------
2 | full_access
(1 row)
-- test re-partition query (needs to transmit intermediate results)
@ -140,10 +140,10 @@ SELECT count(*) FROM test WHERE id = 1;
(1 row)
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
count
-------
2
SELECT count(*), min(current_user) FROM test;
count | min
-------+-------------
2 | read_access
(1 row)
-- test re-partition query (needs to transmit intermediate results)
@ -171,7 +171,7 @@ ERROR: permission denied for table test
SELECT count(*) FROM test WHERE id = 1;
ERROR: permission denied for table test
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
SELECT count(*), min(current_user) FROM test;
ERROR: permission denied for table test
-- test re-partition query
SELECT count(*) FROM test a JOIN test b ON (a.val = b.val) WHERE a.id = 1 AND b.id = 2;

View File

@ -93,10 +93,10 @@ SELECT count(*) FROM test WHERE id = 1;
(1 row)
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
count
-------
2
SELECT count(*), min(current_user) FROM test;
count | min
-------+-------------
2 | full_access
(1 row)
-- test re-partition query (needs to transmit intermediate results)
@ -140,10 +140,10 @@ SELECT count(*) FROM test WHERE id = 1;
(1 row)
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
count
-------
2
SELECT count(*), min(current_user) FROM test;
count | min
-------+-------------
2 | read_access
(1 row)
-- test re-partition query (needs to transmit intermediate results)
@ -171,7 +171,7 @@ ERROR: permission denied for relation test
SELECT count(*) FROM test WHERE id = 1;
ERROR: permission denied for relation test
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
SELECT count(*), min(current_user) FROM test;
ERROR: permission denied for relation test
-- test re-partition query
SELECT count(*) FROM test a JOIN test b ON (a.val = b.val) WHERE a.id = 1 AND b.id = 2;

View File

@ -70,7 +70,7 @@ SELECT count(*) FROM test;
SELECT count(*) FROM test WHERE id = 1;
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
SELECT count(*), min(current_user) FROM test;
-- test re-partition query (needs to transmit intermediate results)
SELECT count(*) FROM test a JOIN test b ON (a.val = b.val) WHERE a.id = 1 AND b.id = 2;
@ -94,7 +94,7 @@ SELECT count(*) FROM test;
SELECT count(*) FROM test WHERE id = 1;
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
SELECT count(*), min(current_user) FROM test;
-- test re-partition query (needs to transmit intermediate results)
SELECT count(*) FROM test a JOIN test b ON (a.val = b.val) WHERE a.id = 1 AND b.id = 2;
@ -115,7 +115,7 @@ SELECT count(*) FROM test;
SELECT count(*) FROM test WHERE id = 1;
SET citus.task_executor_type TO 'task-tracker';
SELECT count(*) FROM test;
SELECT count(*), min(current_user) FROM test;
-- test re-partition query
SELECT count(*) FROM test a JOIN test b ON (a.val = b.val) WHERE a.id = 1 AND b.id = 2;