File: pg_privilege.test

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (22 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# name: test/sql/pg_catalog/pg_privilege.test
# description: Test Postgres compatibility privilege functions
# group: [pg_catalog]

foreach function has_any_column_privilege has_database_privilege has_foreign_data_wrapper_privilege has_function_privilege has_language_privilege has_schema_privilege has_sequence_privilege has_server_privilege has_table_privilege has_tablespace_privilege

query I
SELECT ${function}('main', 'test')
----
true

query I
SELECT ${function}(current_user, 'main', 'test')
----
true

endloop

query II
SELECT has_column_privilege('main', 'test', 'col'), has_column_privilege(current_user, 'main', 'test', 'col')
----
true	true