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
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>31.35.table_privileges</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="information-schema.html" title="Chapter31.The Information Schema">
<link rel="prev" href="infoschema-table-constraints.html" title="31.34.table_constraints">
<link rel="next" href="infoschema-tables.html" title="31.36.tables">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="infoschema-table-privileges"></a>31.35.<code class="literal">table_privileges</code></h2></div></div></div>
<p> The view <code class="literal">table_privileges</code> identifies all
privileges granted on tables or views to the current user or by the
current user. There is one row for each combination of table,
grantor, and grantee. Privileges granted to groups are identified
in the view <code class="literal">role_table_grants</code>.
</p>
<div class="table">
<a name="id701758"></a><p class="title"><b>Table31.33.<code class="literal">table_privileges</code> Columns</b></p>
<div class="table-contents"><table summary="table_privileges Columns" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Data Type</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td><code class="literal">grantor</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the user that granted the privilege</td>
</tr>
<tr>
<td><code class="literal">grantee</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the user or group that the privilege was granted to</td>
</tr>
<tr>
<td><code class="literal">table_catalog</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the database that contains the table (always the current database)</td>
</tr>
<tr>
<td><code class="literal">table_schema</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the schema that contains the table</td>
</tr>
<tr>
<td><code class="literal">table_name</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the table</td>
</tr>
<tr>
<td><code class="literal">privilege_type</code></td>
<td><code class="type">character_data</code></td>
<td> Type of the privilege: <code class="literal">SELECT</code>,
<code class="literal">DELETE</code>, <code class="literal">INSERT</code>,
<code class="literal">UPDATE</code>, <code class="literal">REFERENCES</code>,
<code class="literal">RULE</code>, or <code class="literal">TRIGGER</code>
</td>
</tr>
<tr>
<td><code class="literal">is_grantable</code></td>
<td><code class="type">character_data</code></td>
<td>
<code class="literal">YES</code> if the privilege is grantable, <code class="literal">NO</code> if not</td>
</tr>
<tr>
<td><code class="literal">with_hierarchy</code></td>
<td><code class="type">character_data</code></td>
<td>Applies to a feature not available in <span class="productname">PostgreSQL</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p> Note that the column <code class="literal">grantee</code> makes no
distinction between users and groups. If you have users and groups
with the same name, there is unfortunately no way to distinguish
them. A future version of <span class="productname">PostgreSQL</span>
will possibly prohibit having users and groups with the same name.
</p>
</div></body>
</html>
|