-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
grant_table
2062 lines (1980 loc) · 142 KB
/
grant_table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# LogicTest: local
statement ok
CREATE DATABASE a
statement ok
CREATE USER readwrite
statement ok
GRANT ALL ON DATABASE a TO readwrite
query TTT colnames
SHOW GRANTS ON DATABASE a
----
database_name grantee privilege_type
a admin ALL
a public CONNECT
a readwrite ALL
a root ALL
# Show that by default GRANT is restricted to the current database
query TTTTT colnames
SHOW GRANTS
----
database_name schema_name relation_name grantee privilege_type
test NULL NULL admin ALL
test NULL NULL public CONNECT
test NULL NULL root ALL
test crdb_internal NULL admin ALL
test crdb_internal NULL root ALL
test crdb_internal active_range_feeds public SELECT
test crdb_internal backward_dependencies public SELECT
test crdb_internal builtin_functions public SELECT
test crdb_internal cluster_contended_indexes public SELECT
test crdb_internal cluster_contended_keys public SELECT
test crdb_internal cluster_contended_tables public SELECT
test crdb_internal cluster_contention_events public SELECT
test crdb_internal cluster_database_privileges public SELECT
test crdb_internal cluster_distsql_flows public SELECT
test crdb_internal cluster_inflight_traces public SELECT
test crdb_internal cluster_queries public SELECT
test crdb_internal cluster_sessions public SELECT
test crdb_internal cluster_settings public SELECT
test crdb_internal cluster_transactions public SELECT
test crdb_internal create_schema_statements public SELECT
test crdb_internal create_statements public SELECT
test crdb_internal create_type_statements public SELECT
test crdb_internal cross_db_references public SELECT
test crdb_internal databases public SELECT
test crdb_internal default_privileges public SELECT
test crdb_internal feature_usage public SELECT
test crdb_internal forward_dependencies public SELECT
test crdb_internal gossip_alerts public SELECT
test crdb_internal gossip_liveness public SELECT
test crdb_internal gossip_network public SELECT
test crdb_internal gossip_nodes public SELECT
test crdb_internal index_columns public SELECT
test crdb_internal index_usage_statistics public SELECT
test crdb_internal invalid_objects public SELECT
test crdb_internal jobs public SELECT
test crdb_internal kv_node_liveness public SELECT
test crdb_internal kv_node_status public SELECT
test crdb_internal kv_store_status public SELECT
test crdb_internal leases public SELECT
test crdb_internal lost_descriptors_with_data public SELECT
test crdb_internal node_build_info public SELECT
test crdb_internal node_contention_events public SELECT
test crdb_internal node_distsql_flows public SELECT
test crdb_internal node_inflight_trace_spans public SELECT
test crdb_internal node_metrics public SELECT
test crdb_internal node_queries public SELECT
test crdb_internal node_runtime_info public SELECT
test crdb_internal node_sessions public SELECT
test crdb_internal node_statement_statistics public SELECT
test crdb_internal node_transaction_statistics public SELECT
test crdb_internal node_transactions public SELECT
test crdb_internal node_txn_stats public SELECT
test crdb_internal partitions public SELECT
test crdb_internal predefined_comments public SELECT
test crdb_internal ranges public SELECT
test crdb_internal ranges_no_leases public SELECT
test crdb_internal regions public SELECT
test crdb_internal schema_changes public SELECT
test crdb_internal session_trace public SELECT
test crdb_internal session_variables public SELECT
test crdb_internal statement_statistics public SELECT
test crdb_internal table_columns public SELECT
test crdb_internal table_indexes public SELECT
test crdb_internal table_row_statistics public SELECT
test crdb_internal tables public SELECT
test crdb_internal tenant_usage_details public SELECT
test crdb_internal transaction_statistics public SELECT
test crdb_internal zones public SELECT
test information_schema NULL admin ALL
test information_schema NULL root ALL
test information_schema administrable_role_authorizations public SELECT
test information_schema applicable_roles public SELECT
test information_schema attributes public SELECT
test information_schema character_sets public SELECT
test information_schema check_constraint_routine_usage public SELECT
test information_schema check_constraints public SELECT
test information_schema collation_character_set_applicability public SELECT
test information_schema collations public SELECT
test information_schema column_column_usage public SELECT
test information_schema column_domain_usage public SELECT
test information_schema column_options public SELECT
test information_schema column_privileges public SELECT
test information_schema column_statistics public SELECT
test information_schema column_udt_usage public SELECT
test information_schema columns public SELECT
test information_schema columns_extensions public SELECT
test information_schema constraint_column_usage public SELECT
test information_schema constraint_table_usage public SELECT
test information_schema data_type_privileges public SELECT
test information_schema domain_constraints public SELECT
test information_schema domain_udt_usage public SELECT
test information_schema domains public SELECT
test information_schema element_types public SELECT
test information_schema enabled_roles public SELECT
test information_schema engines public SELECT
test information_schema events public SELECT
test information_schema files public SELECT
test information_schema foreign_data_wrapper_options public SELECT
test information_schema foreign_data_wrappers public SELECT
test information_schema foreign_server_options public SELECT
test information_schema foreign_servers public SELECT
test information_schema foreign_table_options public SELECT
test information_schema foreign_tables public SELECT
test information_schema information_schema_catalog_name public SELECT
test information_schema key_column_usage public SELECT
test information_schema keywords public SELECT
test information_schema optimizer_trace public SELECT
test information_schema parameters public SELECT
test information_schema partitions public SELECT
test information_schema plugins public SELECT
test information_schema processlist public SELECT
test information_schema profiling public SELECT
test information_schema referential_constraints public SELECT
test information_schema resource_groups public SELECT
test information_schema role_column_grants public SELECT
test information_schema role_routine_grants public SELECT
test information_schema role_table_grants public SELECT
test information_schema role_udt_grants public SELECT
test information_schema role_usage_grants public SELECT
test information_schema routine_privileges public SELECT
test information_schema routines public SELECT
test information_schema schema_privileges public SELECT
test information_schema schemata public SELECT
test information_schema schemata_extensions public SELECT
test information_schema sequences public SELECT
test information_schema session_variables public SELECT
test information_schema sql_features public SELECT
test information_schema sql_implementation_info public SELECT
test information_schema sql_parts public SELECT
test information_schema sql_sizing public SELECT
test information_schema st_geometry_columns public SELECT
test information_schema st_spatial_reference_systems public SELECT
test information_schema st_units_of_measure public SELECT
test information_schema statistics public SELECT
test information_schema table_constraints public SELECT
test information_schema table_constraints_extensions public SELECT
test information_schema table_privileges public SELECT
test information_schema tables public SELECT
test information_schema tables_extensions public SELECT
test information_schema tablespaces public SELECT
test information_schema tablespaces_extensions public SELECT
test information_schema transforms public SELECT
test information_schema triggered_update_columns public SELECT
test information_schema triggers public SELECT
test information_schema type_privileges public SELECT
test information_schema udt_privileges public SELECT
test information_schema usage_privileges public SELECT
test information_schema user_attributes public SELECT
test information_schema user_defined_types public SELECT
test information_schema user_mapping_options public SELECT
test information_schema user_mappings public SELECT
test information_schema user_privileges public SELECT
test information_schema view_column_usage public SELECT
test information_schema view_routine_usage public SELECT
test information_schema view_table_usage public SELECT
test information_schema views public SELECT
test pg_catalog NULL admin ALL
test pg_catalog NULL root ALL
test pg_catalog "char" admin ALL
test pg_catalog "char" public USAGE
test pg_catalog "char" root ALL
test pg_catalog "char"[] admin ALL
test pg_catalog "char"[] public USAGE
test pg_catalog "char"[] root ALL
test pg_catalog anyelement admin ALL
test pg_catalog anyelement public USAGE
test pg_catalog anyelement root ALL
test pg_catalog anyelement[] admin ALL
test pg_catalog anyelement[] public USAGE
test pg_catalog anyelement[] root ALL
test pg_catalog bit admin ALL
test pg_catalog bit public USAGE
test pg_catalog bit root ALL
test pg_catalog bit[] admin ALL
test pg_catalog bit[] public USAGE
test pg_catalog bit[] root ALL
test pg_catalog bool admin ALL
test pg_catalog bool public USAGE
test pg_catalog bool root ALL
test pg_catalog bool[] admin ALL
test pg_catalog bool[] public USAGE
test pg_catalog bool[] root ALL
test pg_catalog box2d admin ALL
test pg_catalog box2d public USAGE
test pg_catalog box2d root ALL
test pg_catalog box2d[] admin ALL
test pg_catalog box2d[] public USAGE
test pg_catalog box2d[] root ALL
test pg_catalog bytes admin ALL
test pg_catalog bytes public USAGE
test pg_catalog bytes root ALL
test pg_catalog bytes[] admin ALL
test pg_catalog bytes[] public USAGE
test pg_catalog bytes[] root ALL
test pg_catalog char admin ALL
test pg_catalog char public USAGE
test pg_catalog char root ALL
test pg_catalog char[] admin ALL
test pg_catalog char[] public USAGE
test pg_catalog char[] root ALL
test pg_catalog date admin ALL
test pg_catalog date public USAGE
test pg_catalog date root ALL
test pg_catalog date[] admin ALL
test pg_catalog date[] public USAGE
test pg_catalog date[] root ALL
test pg_catalog decimal admin ALL
test pg_catalog decimal public USAGE
test pg_catalog decimal root ALL
test pg_catalog decimal[] admin ALL
test pg_catalog decimal[] public USAGE
test pg_catalog decimal[] root ALL
test pg_catalog float admin ALL
test pg_catalog float public USAGE
test pg_catalog float root ALL
test pg_catalog float4 admin ALL
test pg_catalog float4 public USAGE
test pg_catalog float4 root ALL
test pg_catalog float4[] admin ALL
test pg_catalog float4[] public USAGE
test pg_catalog float4[] root ALL
test pg_catalog float[] admin ALL
test pg_catalog float[] public USAGE
test pg_catalog float[] root ALL
test pg_catalog geography admin ALL
test pg_catalog geography public USAGE
test pg_catalog geography root ALL
test pg_catalog geography[] admin ALL
test pg_catalog geography[] public USAGE
test pg_catalog geography[] root ALL
test pg_catalog geometry admin ALL
test pg_catalog geometry public USAGE
test pg_catalog geometry root ALL
test pg_catalog geometry[] admin ALL
test pg_catalog geometry[] public USAGE
test pg_catalog geometry[] root ALL
test pg_catalog inet admin ALL
test pg_catalog inet public USAGE
test pg_catalog inet root ALL
test pg_catalog inet[] admin ALL
test pg_catalog inet[] public USAGE
test pg_catalog inet[] root ALL
test pg_catalog int admin ALL
test pg_catalog int public USAGE
test pg_catalog int root ALL
test pg_catalog int2 admin ALL
test pg_catalog int2 public USAGE
test pg_catalog int2 root ALL
test pg_catalog int2[] admin ALL
test pg_catalog int2[] public USAGE
test pg_catalog int2[] root ALL
test pg_catalog int2vector admin ALL
test pg_catalog int2vector public USAGE
test pg_catalog int2vector root ALL
test pg_catalog int2vector[] admin ALL
test pg_catalog int2vector[] public USAGE
test pg_catalog int2vector[] root ALL
test pg_catalog int4 admin ALL
test pg_catalog int4 public USAGE
test pg_catalog int4 root ALL
test pg_catalog int4[] admin ALL
test pg_catalog int4[] public USAGE
test pg_catalog int4[] root ALL
test pg_catalog int[] admin ALL
test pg_catalog int[] public USAGE
test pg_catalog int[] root ALL
test pg_catalog interval admin ALL
test pg_catalog interval public USAGE
test pg_catalog interval root ALL
test pg_catalog interval[] admin ALL
test pg_catalog interval[] public USAGE
test pg_catalog interval[] root ALL
test pg_catalog jsonb admin ALL
test pg_catalog jsonb public USAGE
test pg_catalog jsonb root ALL
test pg_catalog jsonb[] admin ALL
test pg_catalog jsonb[] public USAGE
test pg_catalog jsonb[] root ALL
test pg_catalog name admin ALL
test pg_catalog name public USAGE
test pg_catalog name root ALL
test pg_catalog name[] admin ALL
test pg_catalog name[] public USAGE
test pg_catalog name[] root ALL
test pg_catalog oid admin ALL
test pg_catalog oid public USAGE
test pg_catalog oid root ALL
test pg_catalog oid[] admin ALL
test pg_catalog oid[] public USAGE
test pg_catalog oid[] root ALL
test pg_catalog oidvector admin ALL
test pg_catalog oidvector public USAGE
test pg_catalog oidvector root ALL
test pg_catalog oidvector[] admin ALL
test pg_catalog oidvector[] public USAGE
test pg_catalog oidvector[] root ALL
test pg_catalog pg_aggregate public SELECT
test pg_catalog pg_am public SELECT
test pg_catalog pg_amop public SELECT
test pg_catalog pg_amproc public SELECT
test pg_catalog pg_attrdef public SELECT
test pg_catalog pg_attribute public SELECT
test pg_catalog pg_auth_members public SELECT
test pg_catalog pg_authid public SELECT
test pg_catalog pg_available_extension_versions public SELECT
test pg_catalog pg_available_extensions public SELECT
test pg_catalog pg_cast public SELECT
test pg_catalog pg_class public SELECT
test pg_catalog pg_collation public SELECT
test pg_catalog pg_config public SELECT
test pg_catalog pg_constraint public SELECT
test pg_catalog pg_conversion public SELECT
test pg_catalog pg_cursors public SELECT
test pg_catalog pg_database public SELECT
test pg_catalog pg_db_role_setting public SELECT
test pg_catalog pg_default_acl public SELECT
test pg_catalog pg_depend public SELECT
test pg_catalog pg_description public SELECT
test pg_catalog pg_enum public SELECT
test pg_catalog pg_event_trigger public SELECT
test pg_catalog pg_extension public SELECT
test pg_catalog pg_file_settings public SELECT
test pg_catalog pg_foreign_data_wrapper public SELECT
test pg_catalog pg_foreign_server public SELECT
test pg_catalog pg_foreign_table public SELECT
test pg_catalog pg_group public SELECT
test pg_catalog pg_hba_file_rules public SELECT
test pg_catalog pg_index public SELECT
test pg_catalog pg_indexes public SELECT
test pg_catalog pg_inherits public SELECT
test pg_catalog pg_init_privs public SELECT
test pg_catalog pg_language public SELECT
test pg_catalog pg_largeobject public SELECT
test pg_catalog pg_largeobject_metadata public SELECT
test pg_catalog pg_locks public SELECT
test pg_catalog pg_matviews public SELECT
test pg_catalog pg_namespace public SELECT
test pg_catalog pg_opclass public SELECT
test pg_catalog pg_operator public SELECT
test pg_catalog pg_opfamily public SELECT
test pg_catalog pg_partitioned_table public SELECT
test pg_catalog pg_policies public SELECT
test pg_catalog pg_policy public SELECT
test pg_catalog pg_prepared_statements public SELECT
test pg_catalog pg_prepared_xacts public SELECT
test pg_catalog pg_proc public SELECT
test pg_catalog pg_publication public SELECT
test pg_catalog pg_publication_rel public SELECT
test pg_catalog pg_publication_tables public SELECT
test pg_catalog pg_range public SELECT
test pg_catalog pg_replication_origin public SELECT
test pg_catalog pg_replication_origin_status public SELECT
test pg_catalog pg_replication_slots public SELECT
test pg_catalog pg_rewrite public SELECT
test pg_catalog pg_roles public SELECT
test pg_catalog pg_rules public SELECT
test pg_catalog pg_seclabel public SELECT
test pg_catalog pg_seclabels public SELECT
test pg_catalog pg_sequence public SELECT
test pg_catalog pg_sequences public SELECT
test pg_catalog pg_settings public SELECT
test pg_catalog pg_shadow public SELECT
test pg_catalog pg_shdepend public SELECT
test pg_catalog pg_shdescription public SELECT
test pg_catalog pg_shmem_allocations public SELECT
test pg_catalog pg_shseclabel public SELECT
test pg_catalog pg_stat_activity public SELECT
test pg_catalog pg_stat_all_indexes public SELECT
test pg_catalog pg_stat_all_tables public SELECT
test pg_catalog pg_stat_archiver public SELECT
test pg_catalog pg_stat_bgwriter public SELECT
test pg_catalog pg_stat_database public SELECT
test pg_catalog pg_stat_database_conflicts public SELECT
test pg_catalog pg_stat_gssapi public SELECT
test pg_catalog pg_stat_progress_analyze public SELECT
test pg_catalog pg_stat_progress_basebackup public SELECT
test pg_catalog pg_stat_progress_cluster public SELECT
test pg_catalog pg_stat_progress_create_index public SELECT
test pg_catalog pg_stat_progress_vacuum public SELECT
test pg_catalog pg_stat_replication public SELECT
test pg_catalog pg_stat_slru public SELECT
test pg_catalog pg_stat_ssl public SELECT
test pg_catalog pg_stat_subscription public SELECT
test pg_catalog pg_stat_sys_indexes public SELECT
test pg_catalog pg_stat_sys_tables public SELECT
test pg_catalog pg_stat_user_functions public SELECT
test pg_catalog pg_stat_user_indexes public SELECT
test pg_catalog pg_stat_user_tables public SELECT
test pg_catalog pg_stat_wal_receiver public SELECT
test pg_catalog pg_stat_xact_all_tables public SELECT
test pg_catalog pg_stat_xact_sys_tables public SELECT
test pg_catalog pg_stat_xact_user_functions public SELECT
test pg_catalog pg_stat_xact_user_tables public SELECT
test pg_catalog pg_statio_all_indexes public SELECT
test pg_catalog pg_statio_all_sequences public SELECT
test pg_catalog pg_statio_all_tables public SELECT
test pg_catalog pg_statio_sys_indexes public SELECT
test pg_catalog pg_statio_sys_sequences public SELECT
test pg_catalog pg_statio_sys_tables public SELECT
test pg_catalog pg_statio_user_indexes public SELECT
test pg_catalog pg_statio_user_sequences public SELECT
test pg_catalog pg_statio_user_tables public SELECT
test pg_catalog pg_statistic public SELECT
test pg_catalog pg_statistic_ext public SELECT
test pg_catalog pg_statistic_ext_data public SELECT
test pg_catalog pg_stats public SELECT
test pg_catalog pg_stats_ext public SELECT
test pg_catalog pg_subscription public SELECT
test pg_catalog pg_subscription_rel public SELECT
test pg_catalog pg_tables public SELECT
test pg_catalog pg_tablespace public SELECT
test pg_catalog pg_timezone_abbrevs public SELECT
test pg_catalog pg_timezone_names public SELECT
test pg_catalog pg_transform public SELECT
test pg_catalog pg_trigger public SELECT
test pg_catalog pg_ts_config public SELECT
test pg_catalog pg_ts_config_map public SELECT
test pg_catalog pg_ts_dict public SELECT
test pg_catalog pg_ts_parser public SELECT
test pg_catalog pg_ts_template public SELECT
test pg_catalog pg_type public SELECT
test pg_catalog pg_user public SELECT
test pg_catalog pg_user_mapping public SELECT
test pg_catalog pg_user_mappings public SELECT
test pg_catalog pg_views public SELECT
test pg_catalog record admin ALL
test pg_catalog record public USAGE
test pg_catalog record root ALL
test pg_catalog record[] admin ALL
test pg_catalog record[] public USAGE
test pg_catalog record[] root ALL
test pg_catalog regclass admin ALL
test pg_catalog regclass public USAGE
test pg_catalog regclass root ALL
test pg_catalog regclass[] admin ALL
test pg_catalog regclass[] public USAGE
test pg_catalog regclass[] root ALL
test pg_catalog regnamespace admin ALL
test pg_catalog regnamespace public USAGE
test pg_catalog regnamespace root ALL
test pg_catalog regnamespace[] admin ALL
test pg_catalog regnamespace[] public USAGE
test pg_catalog regnamespace[] root ALL
test pg_catalog regproc admin ALL
test pg_catalog regproc public USAGE
test pg_catalog regproc root ALL
test pg_catalog regproc[] admin ALL
test pg_catalog regproc[] public USAGE
test pg_catalog regproc[] root ALL
test pg_catalog regprocedure admin ALL
test pg_catalog regprocedure public USAGE
test pg_catalog regprocedure root ALL
test pg_catalog regprocedure[] admin ALL
test pg_catalog regprocedure[] public USAGE
test pg_catalog regprocedure[] root ALL
test pg_catalog regrole admin ALL
test pg_catalog regrole public USAGE
test pg_catalog regrole root ALL
test pg_catalog regrole[] admin ALL
test pg_catalog regrole[] public USAGE
test pg_catalog regrole[] root ALL
test pg_catalog regtype admin ALL
test pg_catalog regtype public USAGE
test pg_catalog regtype root ALL
test pg_catalog regtype[] admin ALL
test pg_catalog regtype[] public USAGE
test pg_catalog regtype[] root ALL
test pg_catalog string admin ALL
test pg_catalog string public USAGE
test pg_catalog string root ALL
test pg_catalog string[] admin ALL
test pg_catalog string[] public USAGE
test pg_catalog string[] root ALL
test pg_catalog time admin ALL
test pg_catalog time public USAGE
test pg_catalog time root ALL
test pg_catalog time[] admin ALL
test pg_catalog time[] public USAGE
test pg_catalog time[] root ALL
test pg_catalog timestamp admin ALL
test pg_catalog timestamp public USAGE
test pg_catalog timestamp root ALL
test pg_catalog timestamp[] admin ALL
test pg_catalog timestamp[] public USAGE
test pg_catalog timestamp[] root ALL
test pg_catalog timestamptz admin ALL
test pg_catalog timestamptz public USAGE
test pg_catalog timestamptz root ALL
test pg_catalog timestamptz[] admin ALL
test pg_catalog timestamptz[] public USAGE
test pg_catalog timestamptz[] root ALL
test pg_catalog timetz admin ALL
test pg_catalog timetz public USAGE
test pg_catalog timetz root ALL
test pg_catalog timetz[] admin ALL
test pg_catalog timetz[] public USAGE
test pg_catalog timetz[] root ALL
test pg_catalog unknown admin ALL
test pg_catalog unknown public USAGE
test pg_catalog unknown root ALL
test pg_catalog uuid admin ALL
test pg_catalog uuid public USAGE
test pg_catalog uuid root ALL
test pg_catalog uuid[] admin ALL
test pg_catalog uuid[] public USAGE
test pg_catalog uuid[] root ALL
test pg_catalog varbit admin ALL
test pg_catalog varbit public USAGE
test pg_catalog varbit root ALL
test pg_catalog varbit[] admin ALL
test pg_catalog varbit[] public USAGE
test pg_catalog varbit[] root ALL
test pg_catalog varchar admin ALL
test pg_catalog varchar public USAGE
test pg_catalog varchar root ALL
test pg_catalog varchar[] admin ALL
test pg_catalog varchar[] public USAGE
test pg_catalog varchar[] root ALL
test pg_catalog void admin ALL
test pg_catalog void public USAGE
test pg_catalog void root ALL
test pg_extension NULL admin ALL
test pg_extension NULL root ALL
test pg_extension geography_columns public SELECT
test pg_extension geometry_columns public SELECT
test pg_extension spatial_ref_sys public SELECT
test public NULL admin ALL
test public NULL public CREATE
test public NULL public USAGE
test public NULL root ALL
query TTTTT colnames
SHOW GRANTS FOR root
----
database_name schema_name relation_name grantee privilege_type
test NULL NULL root ALL
test crdb_internal NULL root ALL
test information_schema NULL root ALL
test pg_catalog NULL root ALL
test pg_catalog "char" root ALL
test pg_catalog "char"[] root ALL
test pg_catalog anyelement root ALL
test pg_catalog anyelement[] root ALL
test pg_catalog bit root ALL
test pg_catalog bit[] root ALL
test pg_catalog bool root ALL
test pg_catalog bool[] root ALL
test pg_catalog box2d root ALL
test pg_catalog box2d[] root ALL
test pg_catalog bytes root ALL
test pg_catalog bytes[] root ALL
test pg_catalog char root ALL
test pg_catalog char[] root ALL
test pg_catalog date root ALL
test pg_catalog date[] root ALL
test pg_catalog decimal root ALL
test pg_catalog decimal[] root ALL
test pg_catalog float root ALL
test pg_catalog float4 root ALL
test pg_catalog float4[] root ALL
test pg_catalog float[] root ALL
test pg_catalog geography root ALL
test pg_catalog geography[] root ALL
test pg_catalog geometry root ALL
test pg_catalog geometry[] root ALL
test pg_catalog inet root ALL
test pg_catalog inet[] root ALL
test pg_catalog int root ALL
test pg_catalog int2 root ALL
test pg_catalog int2[] root ALL
test pg_catalog int2vector root ALL
test pg_catalog int2vector[] root ALL
test pg_catalog int4 root ALL
test pg_catalog int4[] root ALL
test pg_catalog int[] root ALL
test pg_catalog interval root ALL
test pg_catalog interval[] root ALL
test pg_catalog jsonb root ALL
test pg_catalog jsonb[] root ALL
test pg_catalog name root ALL
test pg_catalog name[] root ALL
test pg_catalog oid root ALL
test pg_catalog oid[] root ALL
test pg_catalog oidvector root ALL
test pg_catalog oidvector[] root ALL
test pg_catalog record root ALL
test pg_catalog record[] root ALL
test pg_catalog regclass root ALL
test pg_catalog regclass[] root ALL
test pg_catalog regnamespace root ALL
test pg_catalog regnamespace[] root ALL
test pg_catalog regproc root ALL
test pg_catalog regproc[] root ALL
test pg_catalog regprocedure root ALL
test pg_catalog regprocedure[] root ALL
test pg_catalog regrole root ALL
test pg_catalog regrole[] root ALL
test pg_catalog regtype root ALL
test pg_catalog regtype[] root ALL
test pg_catalog string root ALL
test pg_catalog string[] root ALL
test pg_catalog time root ALL
test pg_catalog time[] root ALL
test pg_catalog timestamp root ALL
test pg_catalog timestamp[] root ALL
test pg_catalog timestamptz root ALL
test pg_catalog timestamptz[] root ALL
test pg_catalog timetz root ALL
test pg_catalog timetz[] root ALL
test pg_catalog unknown root ALL
test pg_catalog uuid root ALL
test pg_catalog uuid[] root ALL
test pg_catalog varbit root ALL
test pg_catalog varbit[] root ALL
test pg_catalog varchar root ALL
test pg_catalog varchar[] root ALL
test pg_catalog void root ALL
test pg_extension NULL root ALL
test public NULL root ALL
# With no database set, we show the grants everywhere
statement ok
SET DATABASE = ''
query TTTTT colnames,rowsort
SELECT * FROM [SHOW GRANTS]
WHERE schema_name NOT IN ('crdb_internal', 'pg_catalog', 'information_schema')
----
database_name schema_name relation_name grantee privilege_type
system pg_extension geography_columns public SELECT
system pg_extension geometry_columns public SELECT
system pg_extension spatial_ref_sys public SELECT
defaultdb pg_extension geography_columns public SELECT
defaultdb pg_extension geometry_columns public SELECT
defaultdb pg_extension spatial_ref_sys public SELECT
postgres pg_extension geography_columns public SELECT
postgres pg_extension geometry_columns public SELECT
postgres pg_extension spatial_ref_sys public SELECT
test pg_extension geography_columns public SELECT
test pg_extension geometry_columns public SELECT
test pg_extension spatial_ref_sys public SELECT
a pg_extension geography_columns public SELECT
a pg_extension geometry_columns public SELECT
a pg_extension spatial_ref_sys public SELECT
system public descriptor admin GRANT
system public descriptor admin SELECT
system public descriptor root GRANT
system public descriptor root SELECT
system public users admin DELETE
system public users admin GRANT
system public users admin INSERT
system public users admin SELECT
system public users admin UPDATE
system public users root DELETE
system public users root GRANT
system public users root INSERT
system public users root SELECT
system public users root UPDATE
system public zones admin DELETE
system public zones admin GRANT
system public zones admin INSERT
system public zones admin SELECT
system public zones admin UPDATE
system public zones root DELETE
system public zones root GRANT
system public zones root INSERT
system public zones root SELECT
system public zones root UPDATE
system public settings admin DELETE
system public settings admin GRANT
system public settings admin INSERT
system public settings admin SELECT
system public settings admin UPDATE
system public settings root DELETE
system public settings root GRANT
system public settings root INSERT
system public settings root SELECT
system public settings root UPDATE
system public tenants admin GRANT
system public tenants admin SELECT
system public tenants root GRANT
system public tenants root SELECT
system public lease admin DELETE
system public lease admin GRANT
system public lease admin INSERT
system public lease admin SELECT
system public lease admin UPDATE
system public lease root DELETE
system public lease root GRANT
system public lease root INSERT
system public lease root SELECT
system public lease root UPDATE
system public eventlog admin DELETE
system public eventlog admin GRANT
system public eventlog admin INSERT
system public eventlog admin SELECT
system public eventlog admin UPDATE
system public eventlog root DELETE
system public eventlog root GRANT
system public eventlog root INSERT
system public eventlog root SELECT
system public eventlog root UPDATE
system public rangelog admin DELETE
system public rangelog admin GRANT
system public rangelog admin INSERT
system public rangelog admin SELECT
system public rangelog admin UPDATE
system public rangelog root DELETE
system public rangelog root GRANT
system public rangelog root INSERT
system public rangelog root SELECT
system public rangelog root UPDATE
system public ui admin DELETE
system public ui admin GRANT
system public ui admin INSERT
system public ui admin SELECT
system public ui admin UPDATE
system public ui root DELETE
system public ui root GRANT
system public ui root INSERT
system public ui root SELECT
system public ui root UPDATE
system public jobs admin DELETE
system public jobs admin GRANT
system public jobs admin INSERT
system public jobs admin SELECT
system public jobs admin UPDATE
system public jobs root DELETE
system public jobs root GRANT
system public jobs root INSERT
system public jobs root SELECT
system public jobs root UPDATE
system public web_sessions admin DELETE
system public web_sessions admin GRANT
system public web_sessions admin INSERT
system public web_sessions admin SELECT
system public web_sessions admin UPDATE
system public web_sessions root DELETE
system public web_sessions root GRANT
system public web_sessions root INSERT
system public web_sessions root SELECT
system public web_sessions root UPDATE
system public table_statistics admin DELETE
system public table_statistics admin GRANT
system public table_statistics admin INSERT
system public table_statistics admin SELECT
system public table_statistics admin UPDATE
system public table_statistics root DELETE
system public table_statistics root GRANT
system public table_statistics root INSERT
system public table_statistics root SELECT
system public table_statistics root UPDATE
system public locations admin DELETE
system public locations admin GRANT
system public locations admin INSERT
system public locations admin SELECT
system public locations admin UPDATE
system public locations root DELETE
system public locations root GRANT
system public locations root INSERT
system public locations root SELECT
system public locations root UPDATE
system public role_members admin DELETE
system public role_members admin GRANT
system public role_members admin INSERT
system public role_members admin SELECT
system public role_members admin UPDATE
system public role_members root DELETE
system public role_members root GRANT
system public role_members root INSERT
system public role_members root SELECT
system public role_members root UPDATE
system public comments admin DELETE
system public comments admin GRANT
system public comments admin INSERT
system public comments admin SELECT
system public comments admin UPDATE
system public comments public SELECT
system public comments root DELETE
system public comments root GRANT
system public comments root INSERT
system public comments root SELECT
system public comments root UPDATE
system public replication_constraint_stats admin DELETE
system public replication_constraint_stats admin GRANT
system public replication_constraint_stats admin INSERT
system public replication_constraint_stats admin SELECT
system public replication_constraint_stats admin UPDATE
system public replication_constraint_stats root DELETE
system public replication_constraint_stats root GRANT
system public replication_constraint_stats root INSERT
system public replication_constraint_stats root SELECT
system public replication_constraint_stats root UPDATE
system public replication_critical_localities admin DELETE
system public replication_critical_localities admin GRANT
system public replication_critical_localities admin INSERT
system public replication_critical_localities admin SELECT
system public replication_critical_localities admin UPDATE
system public replication_critical_localities root DELETE
system public replication_critical_localities root GRANT
system public replication_critical_localities root INSERT
system public replication_critical_localities root SELECT
system public replication_critical_localities root UPDATE
system public replication_stats admin DELETE
system public replication_stats admin GRANT
system public replication_stats admin INSERT
system public replication_stats admin SELECT
system public replication_stats admin UPDATE
system public replication_stats root DELETE
system public replication_stats root GRANT
system public replication_stats root INSERT
system public replication_stats root SELECT
system public replication_stats root UPDATE
system public reports_meta admin DELETE
system public reports_meta admin GRANT
system public reports_meta admin INSERT
system public reports_meta admin SELECT
system public reports_meta admin UPDATE
system public reports_meta root DELETE
system public reports_meta root GRANT
system public reports_meta root INSERT
system public reports_meta root SELECT
system public reports_meta root UPDATE
system public namespace admin GRANT
system public namespace admin SELECT
system public namespace root GRANT
system public namespace root SELECT
system public protected_ts_meta admin GRANT
system public protected_ts_meta admin SELECT
system public protected_ts_meta root GRANT
system public protected_ts_meta root SELECT
system public protected_ts_records admin GRANT
system public protected_ts_records admin SELECT
system public protected_ts_records root GRANT
system public protected_ts_records root SELECT
system public role_options admin DELETE
system public role_options admin GRANT
system public role_options admin INSERT
system public role_options admin SELECT
system public role_options admin UPDATE
system public role_options root DELETE
system public role_options root GRANT
system public role_options root INSERT
system public role_options root SELECT
system public role_options root UPDATE
system public statement_bundle_chunks admin DELETE
system public statement_bundle_chunks admin GRANT
system public statement_bundle_chunks admin INSERT
system public statement_bundle_chunks admin SELECT
system public statement_bundle_chunks admin UPDATE
system public statement_bundle_chunks root DELETE
system public statement_bundle_chunks root GRANT
system public statement_bundle_chunks root INSERT
system public statement_bundle_chunks root SELECT
system public statement_bundle_chunks root UPDATE
system public statement_diagnostics_requests admin DELETE
system public statement_diagnostics_requests admin GRANT
system public statement_diagnostics_requests admin INSERT
system public statement_diagnostics_requests admin SELECT
system public statement_diagnostics_requests admin UPDATE
system public statement_diagnostics_requests root DELETE
system public statement_diagnostics_requests root GRANT
system public statement_diagnostics_requests root INSERT
system public statement_diagnostics_requests root SELECT
system public statement_diagnostics_requests root UPDATE
system public statement_diagnostics admin DELETE
system public statement_diagnostics admin GRANT
system public statement_diagnostics admin INSERT
system public statement_diagnostics admin SELECT
system public statement_diagnostics admin UPDATE
system public statement_diagnostics root DELETE
system public statement_diagnostics root GRANT
system public statement_diagnostics root INSERT
system public statement_diagnostics root SELECT
system public statement_diagnostics root UPDATE
system public scheduled_jobs admin DELETE
system public scheduled_jobs admin GRANT
system public scheduled_jobs admin INSERT
system public scheduled_jobs admin SELECT
system public scheduled_jobs admin UPDATE
system public scheduled_jobs root DELETE
system public scheduled_jobs root GRANT
system public scheduled_jobs root INSERT
system public scheduled_jobs root SELECT
system public scheduled_jobs root UPDATE
system public sqlliveness admin DELETE
system public sqlliveness admin GRANT
system public sqlliveness admin INSERT
system public sqlliveness admin SELECT
system public sqlliveness admin UPDATE
system public sqlliveness root DELETE
system public sqlliveness root GRANT
system public sqlliveness root INSERT
system public sqlliveness root SELECT
system public sqlliveness root UPDATE
system public migrations admin DELETE
system public migrations admin GRANT
system public migrations admin INSERT
system public migrations admin SELECT
system public migrations admin UPDATE
system public migrations root DELETE
system public migrations root GRANT
system public migrations root INSERT
system public migrations root SELECT
system public migrations root UPDATE
system public join_tokens admin DELETE
system public join_tokens admin GRANT
system public join_tokens admin INSERT
system public join_tokens admin SELECT
system public join_tokens admin UPDATE
system public join_tokens root DELETE
system public join_tokens root GRANT
system public join_tokens root INSERT
system public join_tokens root SELECT
system public join_tokens root UPDATE
system public statement_statistics admin GRANT
system public statement_statistics admin SELECT
system public statement_statistics root GRANT
system public statement_statistics root SELECT
system public transaction_statistics admin GRANT
system public transaction_statistics admin SELECT
system public transaction_statistics root GRANT
system public transaction_statistics root SELECT
system public database_role_settings admin DELETE
system public database_role_settings admin GRANT
system public database_role_settings admin INSERT
system public database_role_settings admin SELECT
system public database_role_settings admin UPDATE
system public database_role_settings root DELETE
system public database_role_settings root GRANT
system public database_role_settings root INSERT
system public database_role_settings root SELECT
system public database_role_settings root UPDATE
system public tenant_usage admin DELETE
system public tenant_usage admin GRANT
system public tenant_usage admin INSERT
system public tenant_usage admin SELECT
system public tenant_usage admin UPDATE
system public tenant_usage root DELETE
system public tenant_usage root GRANT
system public tenant_usage root INSERT
system public tenant_usage root SELECT
system public tenant_usage root UPDATE
system public sql_instances admin DELETE
system public sql_instances admin GRANT
system public sql_instances admin INSERT
system public sql_instances admin SELECT
system public sql_instances admin UPDATE
system public sql_instances root DELETE
system public sql_instances root GRANT
system public sql_instances root INSERT
system public sql_instances root SELECT
system public sql_instances root UPDATE
system public span_configurations admin DELETE
system public span_configurations admin GRANT
system public span_configurations admin INSERT
system public span_configurations admin SELECT
system public span_configurations admin UPDATE
system public span_configurations root DELETE
system public span_configurations root GRANT
system public span_configurations root INSERT
system public span_configurations root SELECT
system public span_configurations root UPDATE
a pg_extension NULL admin ALL
a pg_extension NULL readwrite ALL
a pg_extension NULL root ALL
a public NULL admin ALL
a public NULL public CREATE
a public NULL public USAGE
a public NULL root ALL
defaultdb pg_extension NULL admin ALL
defaultdb pg_extension NULL root ALL
defaultdb public NULL admin ALL
defaultdb public NULL public CREATE
defaultdb public NULL public USAGE