Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
exclusion_constraint_dialog.html229 linesDownload Raw Back to html
1
2
3<!DOCTYPE html>
4
5<html lang="en" data-content_root="./">
6  <head>
7    <meta charset="utf-8" />
8    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
9
10    <title>Exclusion Constraint Dialog &#8212; pgAdmin 4 8.6 documentation</title>
11    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
12    <link rel="stylesheet" type="text/css" href="_static/style.css?v=d36593c3" />
13    
14    <script src="_static/documentation_options.js?v=d4c83366"></script>
15    <script src="_static/doctools.js?v=9a2dae69"></script>
16    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
17    
18    <script src="_static/sidebar.js"></script>
19    
20    <link rel="index" title="Index" href="genindex.html" />
21    <link rel="search" title="Search" href="search.html" />
22    <link rel="next" title="Foreign key Dialog" href="foreign_key_dialog.html" />
23    <link rel="prev" title="Compound Trigger Dialog" href="compound_trigger_dialog.html" /> 
24  </head><body>
25    <div class="related" role="navigation" aria-label="related navigation">
26      <h3>Navigation</h3>
27      <ul>
28        <li class="right" style="margin-right: 10px">
29          <a href="genindex.html" title="General Index"
30             accesskey="I">index</a></li>
31        <li class="right" >
32          <a href="foreign_key_dialog.html" title="Foreign key Dialog"
33             accesskey="N">next</a> |</li>
34        <li class="right" >
35          <a href="compound_trigger_dialog.html" title="Compound Trigger Dialog"
36             accesskey="P">previous</a> |</li>
37        <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> &#187;</li>
38          <li class="nav-item nav-item-1"><a href="modifying_tables.html" accesskey="U">Creating or Modifying a Table</a> &#187;</li>
39        <li class="nav-item nav-item-this"><a href="">Exclusion Constraint Dialog</a></li> 
40      </ul>
41    </div>  
42
43    <div class="document">
44      <div class="documentwrapper">
45        <div class="bodywrapper">
46          <div class="body" role="main">
47            
48  <section id="exclusion-constraint-dialog">
49<span id="id1"></span><h1><span class="target" id="index-0"></span>Exclusion Constraint Dialog<a class="headerlink" href="#exclusion-constraint-dialog" title="Link to this heading">¶</a></h1>
50<p>Use the <em>Exclusion constraint</em> dialog to define or modify the behavior of an
51exclusion constraint. An exclusion constraint guarantees that if any two rows
52are compared on the specified column or expression (using the specified
53operator), at least one of the operator comparisons will return false or null.</p>
54<p>The <em>Exclusion constraint</em> dialog organizes the development of an exclusion
55constraint through the following dialog tabs: <em>General</em>, <em>Definition</em>, and
56<em>Columns</em>. The <em>SQL</em> tab displays the SQL code generated by dialog selections.</p>
57<img alt="Exclusion constraint dialog general tab" class="align-center" src="_images/exclusion_constraint_general.png" />
58<p>Use the fields in the <em>General</em> tab to identify the exclusion constraint:</p>
59<ul class="simple">
60<li><p>Use the <em>Name</em> field to provide a descriptive name for the exclusion
61constraint. The name will be displayed in the <em>pgAdmin</em> tree control.</p></li>
62</ul>
63<p>Click the <em>Definition</em> tab to continue.</p>
64<img alt="Exclusion constraint dialog definition tab" class="align-center" src="_images/exclusion_constraint_definition.png" />
65<p>Use the fields in the <em>Definition</em> tab to define the exclusion constraint:</p>
66<ul>
67<li><p>Use the drop-down listbox next to <em>Tablespace</em> to select the tablespace in
68which the index associated with the exclude constraint will reside.</p></li>
69<li><p>Use the drop-down listbox next to <em>Access method</em> to specify the type of
70index that will be used when implementing the exclusion constraint:</p>
71<blockquote>
72<div><ul class="simple">
73<li><p>Select <em>gist</em> to specify a GiST index.</p></li>
74<li><p>Select <em>spgist</em> to specify a space-partitioned GiST index.</p></li>
75<li><p>Select <em>btree</em> to specify a B-tree index.</p></li>
76<li><p>Select <em>hash</em> to specify a hash index.</p></li>
77</ul>
78</div></blockquote>
79</li>
80<li><p>Use the <em>Fill Factor</em> field to specify a fill factor for the table and
81associated index. The fill factor is a percentage between 10 and 100. 100
82(complete packing) is the default.</p></li>
83<li><p>Move the <em>Deferrable?</em> switch to the <em>Yes</em> position to specify that the
84timing of the constraint is deferrable, and can be postponed until the end of
85the statement. The default is <em>No</em>.</p></li>
86<li><p>If enabled, move the <em>Deferred?</em> switch to the <em>Yes</em> position to specify the
87timing of the constraint is deferred to the end of the statement. The default
88is <em>No</em>.</p></li>
89<li><p>Use the <em>Constraint</em> field to provide a condition that a row must satisfy to
90be included in the table.</p></li>
91</ul>
92<p>Click the <em>Columns</em> tab to continue.</p>
93<img alt="Exclusion constraint dialog columns tab" class="align-center" src="_images/exclusion_constraint_columns.png" />
94<p>Use the fields in the <em>Columns</em> tab to specify the column(s) or expression(s)
95to which the constraint applies. Use the <em>Is expression ?</em> switch to enable
96expression text input. Use the drop-down listbox next to <em>Column</em>
97to select a column. Once the <em>Column</em> is selected or the <em>Expression</em> is
98entered then click the <em>Add</em> icon (+) to provide details of the action on the
99column/expression:</p>
100<ul class="simple">
101<li><p>The <em>Col/Exp</em> field is populated with the selection made in the <em>Column</em>
102drop-down listbox or the <em>Expression</em> entered.</p></li>
103<li><p>If applicable, use the drop-down listbox in the <em>Operator class</em> to specify
104the operator class that will be used by the index for the column.</p></li>
105<li><p>Move the <em>DESC</em> switch to <em>DESC</em> to specify a descending sort order. The
106default is <em>ASC</em> which specifies an ascending sort order.</p></li>
107<li><p>Use the <em>NULLs order</em> column to specify the placement of NULL values (when
108sorted).  Specify <em>FIRST</em> or <em>LAST</em>.</p></li>
109<li><p>Use the drop-down list next to <em>Operator</em> to specify a comparison or
110conditional operator.</p></li>
111</ul>
112<p>Use <em>Include columns</em> field to specify columns for <em>INCLUDE</em> clause of the
113constraint. This option is available in Postgres 11 and later.</p>
114<p>Click the <em>SQL</em> tab to continue.</p>
115<p>Your entries in the <em>Exclusion Constraint</em> dialog generate a SQL command (see
116an example below). Use the <em>SQL</em> tab for review; revisit or switch tabs to make
117any changes to the SQL command.</p>
118<section id="example">
119<h2>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h2>
120<p>The following is an example of the sql command generated by user selections in
121the <em>Exclusion Constraint</em> dialog:</p>
122<img alt="Exclusion constraint dialog sql tab" class="align-center" src="_images/exclusion_constraint_sql.png" />
123<p>The example shown demonstrates creating an exclusion constraint named
124<em>ex_dept_no</em>. The constraint uses a btree index.</p>
125<ul class="simple">
126<li><p>Click the <em>Info</em> button (i) to access online help.</p></li>
127<li><p>Click the <em>Save</em> button to save work.</p></li>
128<li><p>Click the <em>Close</em> button to exit without saving work.</p></li>
129<li><p>Click the <em>Reset</em> button to restore configuration parameters.</p></li>
130</ul>
131</section>
132</section>
133
134
135            <div class="clearer"></div>
136          </div>
137        </div>
138      </div>
139      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
140        <div class="sphinxsidebarwrapper">
141  <div>
142    <h3><a href="index.html">Table of Contents</a></h3>
143    <ul>
144<li><a class="reference internal" href="#">Exclusion Constraint Dialog</a><ul>
145<li><a class="reference internal" href="#example">Example</a></li>
146</ul>
147</li>
148</ul>
149
150  </div>
151<h3><a href="index.html">Table of Contents</a></h3>
152<ul class="current">
153<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
154<li class="toctree-l1"><a class="reference internal" href="external_database.html">External database for pgAdmin user settings</a></li>
155<li class="toctree-l1"><a class="reference internal" href="connecting.html">Connecting To A Server</a></li>
156<li class="toctree-l1"><a class="reference internal" href="managing_cluster_objects.html">Managing Cluster Objects</a></li>
157<li class="toctree-l1"><a class="reference internal" href="managing_database_objects.html">Managing Database Objects</a></li>
158<li class="toctree-l1 current"><a class="reference internal" href="modifying_tables.html">Creating or Modifying a Table</a><ul class="current">
159<li class="toctree-l2"><a class="reference internal" href="check_dialog.html">Check Dialog</a></li>
160<li class="toctree-l2"><a class="reference internal" href="column_dialog.html">Column Dialog</a></li>
161<li class="toctree-l2"><a class="reference internal" href="compound_trigger_dialog.html">Compound Trigger Dialog</a></li>
162<li class="toctree-l2 current"><a class="current reference internal" href="#">Exclusion Constraint Dialog</a></li>
163<li class="toctree-l2"><a class="reference internal" href="foreign_key_dialog.html">Foreign key Dialog</a></li>
164<li class="toctree-l2"><a class="reference internal" href="index_dialog.html">Index Dialog</a></li>
165<li class="toctree-l2"><a class="reference internal" href="primary_key_dialog.html">Primary key Dialog</a></li>
166<li class="toctree-l2"><a class="reference internal" href="rls_policy_dialog.html">RLS Policy Dialog</a></li>
167<li class="toctree-l2"><a class="reference internal" href="rule_dialog.html">Rule Dialog</a></li>
168<li class="toctree-l2"><a class="reference internal" href="table_dialog.html">Table Dialog</a></li>
169<li class="toctree-l2"><a class="reference internal" href="trigger_dialog.html">Trigger Dialog</a></li>
170<li class="toctree-l2"><a class="reference internal" href="unique_constraint_dialog.html">Unique Constraint Dialog</a></li>
171</ul>
172</li>
173<li class="toctree-l1"><a class="reference internal" href="management_basics.html">Management Basics</a></li>
174<li class="toctree-l1"><a class="reference internal" href="backup_and_restore.html">Backup and Restore</a></li>
175<li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
176<li class="toctree-l1"><a class="reference internal" href="processes.html">Processes</a></li>
177<li class="toctree-l1"><a class="reference internal" href="pgagent.html">pgAgent</a></li>
178<li class="toctree-l1"><a class="reference internal" href="contributions.html">pgAdmin Project Contributions</a></li>
179<li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release Notes</a></li>
180<li class="toctree-l1"><a class="reference internal" href="licence.html">Licence</a></li>
181</ul>
182
183<search id="searchbox" style="display: none" role="search">
184  <h3 id="searchlabel">Quick search</h3>
185    <div class="searchformwrapper">
186    <form class="search" action="search.html" method="get">
187      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
188      <input type="submit" value="Go" />
189    </form>
190    </div>
191</search>
192<script>document.getElementById('searchbox').style.display = "block"</script>
193        </div>
194<div id="sidebarbutton" title="Collapse sidebar">
195<span>«</span>
196</div>
197
198      </div>
199      <div class="clearer"></div>
200    </div>
201    <div class="related" role="navigation" aria-label="related navigation">
202      <h3>Navigation</h3>
203      <ul>
204        <li class="right" style="margin-right: 10px">
205          <a href="genindex.html" title="General Index"
206             >index</a></li>
207        <li class="right" >
208          <a href="foreign_key_dialog.html" title="Foreign key Dialog"
209             >next</a> |</li>
210        <li class="right" >
211          <a href="compound_trigger_dialog.html" title="Compound Trigger Dialog"
212             >previous</a> |</li>
213        <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> &#187;</li>
214          <li class="nav-item nav-item-1"><a href="modifying_tables.html" >Creating or Modifying a Table</a> &#187;</li>
215        <li class="nav-item nav-item-this"><a href="">Exclusion Constraint Dialog</a></li> 
216      </ul>
217    </div>
218    <div class="footer" role="contentinfo">
219        <div class="related" role="navigation" aria-label="related navigation">
220          <ul>
221              <li class="left" style="margin-left: 10px">&#169; Copyright (C) 2013 - 2024, The pgAdmin Development Team.</li>
222            <li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
223            <li class="right" ><a href="foreign_key_dialog.html" title="Foreign key Dialog" accesskey="N">next</a> |</li>
224            <li class="right" ><a href="compound_trigger_dialog.html" title="Compound Trigger Dialog" accesskey="P">previous</a> |</li>
225          </ul>
226        </div>
227    </div>
228  </body>
229</html>
codekingpro/portable-devtools · Team Ai