Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99cc10a

Browse files
author
Thomas G. Lockhart
committed
Add mention of SET CONSTRAINT and CREATE CONSTRAINT TRIGGER.
1 parent0e2dfd5 commit99cc10a

File tree

4 files changed

+202
-8
lines changed

4 files changed

+202
-8
lines changed

‎doc/src/sgml/ref/allfiles.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.17 2000/04/08 05:11:03 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.18 2000/04/14 15:17:28 thomas Exp $
33
Postgres documentation
44
Complete list of usable sgml source files in this directory.
55
-->
@@ -50,6 +50,7 @@ Complete list of usable sgml source files in this directory.
5050
<!entity commit system "commit.sgml">
5151
<!entity copyTable system "copy.sgml">
5252
<!entity createAggregate system "create_aggregate.sgml">
53+
<!entity createConstraint system "create_constraint.sgml">
5354
<!entity createDatabase system "create_database.sgml">
5455
<!entity createFunction system "create_function.sgml">
5556
<!entity createGroup system "create_group.sgml">

‎doc/src/sgml/ref/commands.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.24 2000/04/08 05:11:03 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.25 2000/04/14 15:17:28 thomas Exp $
33
Postgres documentation
44
-->
55

@@ -24,6 +24,7 @@ Postgres documentation
2424
&commit;
2525
&copyTable;
2626
&createAggregate;
27+
&createConstraint;
2728
&createDatabase;
2829
&createFunction;
2930
&createGroup;
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<!--
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_constraint.sgml,v 1.1 2000/04/14 15:17:28 thomas Exp $
3+
Postgres documentation
4+
-->
5+
6+
<refentry id="SQL-CREATECONSTRAINT">
7+
<refmeta>
8+
<refentrytitle id="sql-createconstraint-title">
9+
CREATE CONSTRAINT TRIGGER
10+
</refentrytitle>
11+
<refmiscinfo>SQL - Language Statements</refmiscinfo>
12+
</refmeta>
13+
<refnamediv>
14+
<refname>
15+
CREATE CONSTRAINT TRIGGER
16+
</refname>
17+
<refpurpose>
18+
Create a trigger to support a constraint
19+
</refpurpose>
20+
</refnamediv>
21+
<refsynopsisdiv>
22+
<refsynopsisdivinfo>
23+
<date>2000-04-13</date>
24+
</refsynopsisdivinfo>
25+
<synopsis>
26+
CREATE CONSTRAINT TRIGGER <replaceable class="parameter">name</replaceable>
27+
AFTER <replaceable class="parameter">events</replaceable> ON
28+
<replaceable class="parameter">relation</replaceable> <replaceable class="parameter">constraint</replaceable> <replaceable class="parameter">attributes</replaceable>
29+
FOR EACH ROW EXECUTE PROCEDURE <replaceable class="parameter">func</replaceable> '(' <replaceable class="parameter">args</replaceable> ')'
30+
</synopsis>
31+
32+
<refsect2 id="R2-SQL-CREATECONSTRAINT-1">
33+
<title>
34+
Inputs
35+
</title>
36+
<para>
37+
38+
<variablelist>
39+
<varlistentry>
40+
<term><replaceable class="PARAMETER">name</replaceable></term>
41+
<listitem>
42+
<para>
43+
The name of the constraint trigger.
44+
</para>
45+
</listitem>
46+
</varlistentry>
47+
48+
<varlistentry>
49+
<term><replaceable class="PARAMETER">events</replaceable></term>
50+
<listitem>
51+
<para>
52+
The event categories for which this trigger should be fired.
53+
</para>
54+
</listitem>
55+
</varlistentry>
56+
57+
<varlistentry>
58+
<term><replaceable class="PARAMETER">relation</replaceable></term>
59+
<listitem>
60+
<para>
61+
Table name of the triggering relation.
62+
</para>
63+
</listitem>
64+
</varlistentry>
65+
66+
<varlistentry>
67+
<term><replaceable class="PARAMETER">constraint</replaceable></term>
68+
<listitem>
69+
<para>
70+
Actual onstraint specification.
71+
</para>
72+
</listitem>
73+
</varlistentry>
74+
75+
<varlistentry>
76+
<term><replaceable class="PARAMETER">attributes</replaceable></term>
77+
<listitem>
78+
<para>
79+
Contraint attributes.
80+
</para>
81+
</listitem>
82+
</varlistentry>
83+
84+
<varlistentry>
85+
<term><replaceable class="PARAMETER">func</replaceable>(<replaceable class="PARAMETER">args</replaceable>)</term>
86+
<listitem>
87+
<para>
88+
Function to call as part of the trigger processing.
89+
</para>
90+
</listitem>
91+
</varlistentry>
92+
</variablelist>
93+
</para>
94+
</refsect2>
95+
96+
<refsect2 id="R2-SQL-CREATECONSTRAINT-2">
97+
<title>
98+
Outputs
99+
</title>
100+
<para>
101+
102+
<variablelist>
103+
<varlistentry>
104+
<term><computeroutput>
105+
CREATE CONSTRAINT
106+
</computeroutput></term>
107+
<listitem>
108+
<para>
109+
Message returned if successful.
110+
</para>
111+
</listitem>
112+
</varlistentry>
113+
</variablelist>
114+
</para>
115+
</refsect2>
116+
</refsynopsisdiv>
117+
118+
<refsect1 id="R1-SQL-CREATECONSTRAINT-1">
119+
<title>
120+
Description
121+
</title>
122+
<para>
123+
<command>CREATE CONSTRAINT TRIGGER</command> is used from inside of
124+
<command>CREATE/ALTER TABLE</command> and by
125+
<application>pg_dump</application> to create the special triggers for
126+
referential integrity.
127+
</para>
128+
129+
<para>
130+
It is not intended for general use.
131+
</para>
132+
</refsect1>
133+
</refentry>
134+
135+
<!-- Keep this comment at the end of the file
136+
Local variables:
137+
mode: sgml
138+
sgml-omittag:nil
139+
sgml-shorttag:t
140+
sgml-minimize-attributes:nil
141+
sgml-always-quote-attributes:t
142+
sgml-indent-step:1
143+
sgml-indent-data:t
144+
sgml-parent-document:nil
145+
sgml-default-dtd-file:"../reference.ced"
146+
sgml-exposed-tags:nil
147+
sgml-local-catalogs:"/usr/lib/sgml/catalog"
148+
sgml-local-ecat-files:nil
149+
End:
150+
-->

‎doc/src/sgml/ref/set.sgml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.39 2000/04/1117:23:35 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.40 2000/04/14 15:17:28 thomas Exp $
33
Postgres documentation
44
-->
55

@@ -24,6 +24,7 @@ Postgres documentation
2424
</refsynopsisdivinfo>
2525
<synopsis>
2626
SET <replaceable class="PARAMETER">variable</replaceable> { TO | = } { <replaceable class="PARAMETER">value</replaceable> | '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
27+
SET CONSTRAINTS {ALL | <replaceable class="parameter">constraintlist</replaceable>} <replaceable>mode</replaceable>
2728
SET TIME ZONE { '<replaceable class="PARAMETER">timezone</replaceable>' | LOCAL | DEFAULT }
2829
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
2930
</synopsis>
@@ -92,7 +93,7 @@ SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
9293
</varlistentry>
9394

9495
<varlistentry>
95-
<term>DateStyle</term>
96+
<term>DATESTYLE</term>
9697
<listitem>
9798
<para>
9899
Set the date/time representation style. Affects the output format,
@@ -202,7 +203,7 @@ SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
202203
</varlistentry>
203204

204205
<varlistentry>
205-
<term>Seed</term>
206+
<term>SEED</term>
206207
<listitem>
207208
<para>
208209
Sets the internal seed for the random number generator.
@@ -243,14 +244,14 @@ SELECT setseed(<replaceable>value</replaceable>);
243244
<term>SERVER_ENCODING</term>
244245
<listitem>
245246
<para>
246-
Sets the multi-byte server encoding
247+
Sets the multi-byte server encoding to:
247248

248249
<variablelist>
249250
<varlistentry>
250251
<term><replaceable class="parameter">value</replaceable></term>
251252
<listitem>
252253
<para>
253-
Sets the multi-byte server encoding.
254+
The identifying value for the server encoding.
254255
</para>
255256
</listitem>
256257
</varlistentry>
@@ -265,6 +266,47 @@ SELECT setseed(<replaceable>value</replaceable>);
265266
</varlistentry>
266267

267268
<varlistentry>
269+
<term>CONSTRAINT</term>
270+
<listitem>
271+
<para>
272+
SET CONSTRAINTS is the SQL3 specified command to change the
273+
default behaviour of constraints with respect to deferring in the current
274+
transaction. Allowed parameters are:
275+
276+
<variablelist>
277+
<varlistentry>
278+
<term><replaceable class="parameter">constraintlist</replaceable></term>
279+
<listitem>
280+
<para>
281+
Comma separated list of deferrable constraint names.
282+
</para>
283+
</listitem>
284+
</varlistentry>
285+
286+
<varlistentry>
287+
<term><replaceable class="parameter">mode</replaceable></term>
288+
<listitem>
289+
<para>
290+
The constraint mode. Allowed values are
291+
<option>DEFERRED</option> and <option>IMMEDIATE</option>.
292+
</para>
293+
</listitem>
294+
</varlistentry>
295+
</variablelist>
296+
</para>
297+
298+
<para>
299+
In deferred mode, the actual check of the constraint is held
300+
back until either its mode is explicitly set to <option>IMMEDIATE</option>,
301+
or until COMMIT. This is actually only done for foreign key
302+
constraints, so it does not apply to UNIQUE or other
303+
constraints.
304+
</para>
305+
</listitem>
306+
</varlistentry>
307+
308+
<varlistentry>
309+
<term>TIME ZONE</term>
268310
<term>TIMEZONE</term>
269311
<listitem>
270312
<para>
@@ -862,7 +904,7 @@ SET VARIABLE
862904
</computeroutput></term>
863905
<listitem>
864906
<para>
865-
Message returned ifsuccessfully.
907+
Message returned ifsuccessful.
866908
</para>
867909
</listitem>
868910
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp