You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
149051: builtins: add has_system_privilege builtin function r=rafiss a=rafiss
This builtin function can be used to check for a system privilege using a SQL interface.
Epic: None
Release note (sql change): Added the has_system_privilege builtin function, which can be used to check if a user has the given system privilege.
Co-authored-by: Rafi Shamim <[email protected]>
Copy file name to clipboardExpand all lines: docs/generated/sql/functions.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3502,6 +3502,12 @@ may increase either contention or retry errors, or both.</p>
3502
3502
</span></td><td>Stable</td></tr>
3503
3503
<tr><td><aname="has_server_privilege"></a><code>has_server_privilege(user: oid, server: oid, privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the user has privileges for foreign server.</p>
3504
3504
</span></td><td>Stable</td></tr>
3505
+
<tr><td><aname="has_system_privilege"></a><code>has_system_privilege(privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the current user has privileges for system.</p>
3506
+
</span></td><td>Stable</td></tr>
3507
+
<tr><td><aname="has_system_privilege"></a><code>has_system_privilege(user: <ahref="string.html">string</a>, privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the user has privileges for system.</p>
3508
+
</span></td><td>Stable</td></tr>
3509
+
<tr><td><aname="has_system_privilege"></a><code>has_system_privilege(user: oid, privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the user has privileges for system.</p>
3510
+
</span></td><td>Stable</td></tr>
3505
3511
<tr><td><aname="has_table_privilege"></a><code>has_table_privilege(table: <ahref="string.html">string</a>, privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the current user has privileges for table.</p>
3506
3512
</span></td><td>Stable</td></tr>
3507
3513
<tr><td><aname="has_table_privilege"></a><code>has_table_privilege(table: oid, privilege: <ahref="string.html">string</a>) → <ahref="bool.html">bool</a></code></td><td><spanclass="funcdesc"><p>Returns whether or not the current user has privileges for table.</p>
0 commit comments