Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9ce4ae8

Browse files
author
Thomas G. Lockhart
committed
Enhanced the allowed constraint syntax, so remove mention of the problem.
1 parent 40aa761 commit 9ce4ae8

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

doc/src/sgml/ref/create_table.sgml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -678,35 +678,17 @@
678678
The CHECK constraint specifies a rule that a group of one or
679679
more columns of a table may contain only those values allowed by
680680
the rule.
681-
</para>
682-
<PARA>
683681
The CHECK constraint is either a table constraint or a column
684682
constraint.
685683
</PARA>
686684
<PARA>
687685
PostgreSQL automatically creates an unique index to assure
688-
data integrity. (See CREATE INDEX statement)
689-
</PARA>
690-
<PARA>
686+
data integrity (See CREATE INDEX statement).
691687
The SQL92 CHECK column constraints can only be defined on, and
692688
refer to, one column of the table. PostgreSQL does not have
693689
this restriction.
694690
</PARA>
695691
</refsect3>
696-
<refsect3>
697-
<title>BUGS in CHECK constraint</title>
698-
<PARA>
699-
The following CHECK constraints gives a parse error like:
700-
<programlisting>
701-
ERROR: parser: parse error at or near "opname":
702-
</programlisting>
703-
<simplelist columns="1">
704-
<member>CHECK ( <replaceable class="parameter">column</replaceable> BETWEEN 'A' AND 'Z' )</member>
705-
<member>CHECK ( <replaceable class="parameter">column</replaceable> IN ('A','Z'))</member>
706-
<member>CHECK ( <replaceable class="parameter">column</replaceable> NOT LIKE 'A%')</member>
707-
</simplelist>
708-
</para>
709-
</refsect3>
710692
</REFSECT2>
711693

712694
<REFSECT2 ID="R2-SQL-PRIMARYKEY-1">
@@ -1015,10 +997,11 @@
1015997
</programlisting>
1016998
<para>
1017999
Temporary tables are not currently available in <productname>Postgres</productname>.
1000+
<tip>
10181001
<para>
1019-
TIP: In the current release of <productname>Postgres</productname> (v6.3.2), to create a temporary
1002+
In the current release of <productname>Postgres</productname> (v6.4), to create a temporary
10201003
table you must create and drop the table by explicit commands.
1021-
</para>
1004+
</tip>
10221005

10231006
<REFSECT3 ID="R3-SQL-UNIQUECLAUSE-1">
10241007
<REFSECT3INFO>
@@ -1067,6 +1050,13 @@ Temporary tables are not currently available in <productname>Postgres</productna
10671050
</synopsis>
10681051
</REFSECT3>
10691052

1053+
<!--
1054+
I can't figure out why DEFAULT clause is different from what we already have.
1055+
Perhaps because CURRENT_USER and CURRENT_DATE have specific types (currently
1056+
the "name" type), if you aren't careful then the types won't match up with
1057+
the column. Not our problem...
1058+
- Thomas 1998-08-16
1059+
10701060
<REFSECT3 ID="R3-SQL-DEFAULTCLAUSE-1">
10711061
<REFSECT3INFO>
10721062
<DATE>1998-04-15</DATE>
@@ -1080,12 +1070,12 @@ Temporary tables are not currently available in <productname>Postgres</productna
10801070
or a domain.
10811071
</para>
10821072
<synopsis>
1083-
DEFAULT <replaceable class="parameter">literal</replaceable> |
1084-
niladic USER function |
1085-
niladic datetime function |
1086-
NULL
1073+
DEFAULT niladic USER function |
1074+
niladic datetime function |
1075+
NULL
10871076
</synopsis>
10881077
</refsect3>
1078+
-->
10891079

10901080
<REFSECT3 ID="R3-SQL-CONSTRAINT-3">
10911081
<REFSECT3INFO>
@@ -1096,7 +1086,7 @@ Temporary tables are not currently available in <productname>Postgres</productna
10961086
</TITLE>
10971087
<PARA>
10981088
SQL92 specifies some additional capabilities for CONSTRAINTs,
1099-
it also defines assertions and domain constraints.
1089+
and also defines assertions and domain constraints.
11001090
</PARA>
11011091
<PARA>
11021092
An assertion is a special type of integrity constraint and share
@@ -1209,12 +1199,19 @@ Temporary tables are not currently available in <productname>Postgres</productna
12091199
CHECK clause
12101200
</TITLE>
12111201
<PARA>
1212-
SQL92 specifies some additional capabilities for CHECK:
1202+
SQL92 specifies some additional capabilities for CHECK in either
1203+
table or column constraints.
12131204
</PARA>
1205+
<!--
1206+
Constraints associated with domains do not need to be mentioned here,
1207+
even though it is the case that a domain constraint may possibly
1208+
affect a column or a table.
1209+
- Thomas 1998-08-16
12141210
<para>
12151211
A CHECK constraint is either a table constraint, a column
12161212
constraint or a domain constraint.
12171213
</para>
1214+
-->
12181215
<para>
12191216
table constraint definition:
12201217
</para>
@@ -1233,6 +1230,7 @@ Temporary tables are not currently available in <productname>Postgres</productna
12331230
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
12341231
[ [ NOT ] DEFERRABLE ]
12351232
</synopsis>
1233+
<!--
12361234
<para>
12371235
domain constraint definition:
12381236
</para>
@@ -1253,6 +1251,7 @@ Temporary tables are not currently available in <productname>Postgres</productna
12531251
ALTER DOMAIN cities
12541252
ADD CONSTRAINT new_city CHECK (VALUE LIKE 'L%');
12551253
</programlisting>
1254+
-->
12561255
</refsect3>
12571256

12581257

0 commit comments

Comments
 (0)