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
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>31.11.constraint_table_usage</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-constraint-column-usage.html" title="31.10.constraint_column_usage">
<link rel="next" href="infoschema-data-type-privileges.html" title="31.12.data_type_privileges">
<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-constraint-table-usage"></a>31.11.<code class="literal">constraint_table_usage</code></h2></div></div></div>
<p> The view <code class="literal">constraint_table_usage</code> identifies all
tables in the current database that are used by some constraint and
are owned by the current user. (This is different from the view
<code class="literal">table_constraints</code>, which identifies all table
constraints along with the table they are defined on.) For a
foreign key constraint, this view identifies the table that the
foreign key references. For a unique or primary key constraint,
this view simply identifies the table the constraint belongs to.
Check constraints and not-null constraints are not included in this
view.
</p>
<div class="table">
<a name="id694857"></a><p class="title"><b>Table31.9.<code class="literal">constraint_table_usage</code> Columns</b></p>
<div class="table-contents"><table summary="constraint_table_usage 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">table_catalog</code></td>
<td><code class="type">sql_identifier</code></td>
<td> Name of the database that contains the table that is used by
some constraint (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 that is used by some
constraint
</td>
</tr>
<tr>
<td><code class="literal">table_name</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the table that is used by some constraint</td>
</tr>
<tr>
<td><code class="literal">constraint_catalog</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the database that contains the constraint (always the current database)</td>
</tr>
<tr>
<td><code class="literal">constraint_schema</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the schema that contains the constraint</td>
</tr>
<tr>
<td><code class="literal">constraint_name</code></td>
<td><code class="type">sql_identifier</code></td>
<td>Name of the constraint</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div></body>
</html>
|