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

Commit e560dd3

Browse files
committed
Minor copy-editing.
1 parent 1a61554 commit e560dd3

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

doc/src/sgml/ddl.sgml

+25-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.22 2003/11/04 09:55:38 petere Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.23 2003/11/05 00:05:32 tgl Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -12,8 +12,7 @@
1212
Subsequently, we discuss how tables can be organized into
1313
schemas, and how privileges can be assigned to tables. Finally,
1414
we will briefly look at other features that affect the data storage,
15-
such as views, functions, and triggers. Detailed information on
16-
these topics is found in <xref linkend="server-programming">.
15+
such as views, functions, and triggers.
1716
</para>
1817

1918
<sect1 id="ddl-basics">
@@ -522,7 +521,7 @@ CREATE TABLE products (
522521
<para>
523522
It should be noted that a check constraint is satisfied if the
524523
check expression evaluates to true or the null value. Since most
525-
expressions will evaluate to the null value if one operand is null
524+
expressions will evaluate to the null value if one operand is null,
526525
they will not prevent null values in the constrained columns. To
527526
ensure that a column does not contain null values, the not-null
528527
constraint described in the next section should be used.
@@ -586,7 +585,7 @@ CREATE TABLE products (
586585
The <literal>NULL</literal> constraint is not defined in the SQL
587586
standard and should not be used in portable applications. (It was
588587
only added to <productname>PostgreSQL</productname> to be
589-
compatible with other database systems.) Some users, however,
588+
compatible with some other database systems.) Some users, however,
590589
like it because it makes it easy to toggle the constraint in a
591590
script file. For example, you could start with
592591
<programlisting>
@@ -820,7 +819,7 @@ CREATE TABLE orders (
820819
);
821820
</programlisting>
822821
because in absence of a column list the primary key of the
823-
referenced table is used as referenced column.
822+
referenced table is used as the referenced column.
824823
</para>
825824

826825
<para>
@@ -1094,9 +1093,10 @@ WHERE c.altitude &gt; 500 and c.tableoid = p.oid;
10941093
<title>Deprecated</title>
10951094
<para>
10961095
In previous versions of <productname>PostgreSQL</productname>, the
1097-
default was not to get access to child tables. This was found to
1098-
be error prone and is also in violation of the SQL99 standard. Under the old
1099-
syntax, to get the sub-tables you append <literal>*</literal> to the table name.
1096+
default behavior was not to include child tables in queries. This was
1097+
found to be error prone and is also in violation of the SQL99
1098+
standard. Under the old syntax, to get the sub-tables you append
1099+
<literal>*</literal> to the table name.
11001100
For example
11011101
<programlisting>
11021102
SELECT * from cities*;
@@ -1270,6 +1270,12 @@ ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;
12701270
<programlisting>
12711271
ALTER TABLE products DROP CONSTRAINT some_name;
12721272
</programlisting>
1273+
(If you are dealing with a generated constraint name like <literal>$2</>,
1274+
don't forget that you'll need to double-quote it to make it a valid
1275+
identifier.)
1276+
</para>
1277+
1278+
<para>
12731279
This works the same for all constraint types except not-null
12741280
constraints. To drop a not null constraint use
12751281
<programlisting>
@@ -1739,9 +1745,11 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
17391745
A user can also be allowed to create objects in someone else's
17401746
schema. To allow that, the <literal>CREATE</literal> privilege on
17411747
the schema needs to be granted. Note that by default, everyone
1742-
has the <literal>CREATE</literal> privilege on the schema
1743-
<literal>public</literal>. This allows all users that manage to
1744-
connect to a given database to create objects there. If you do
1748+
has <literal>CREATE</literal> and <literal>USAGE</literal> privileges on
1749+
the schema
1750+
<literal>public</literal>. This allows all users that are able to
1751+
connect to a given database to create objects in its
1752+
<literal>public</literal> schema. If you do
17451753
not want to allow that, you can revoke that privilege:
17461754
<programlisting>
17471755
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
@@ -1905,6 +1913,11 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
19051913
</para>
19061914
</listitem>
19071915
</itemizedlist>
1916+
1917+
<para>
1918+
Detailed information on
1919+
these topics appears in <xref linkend="server-programming">.
1920+
</para>
19081921
</sect1>
19091922

19101923
<sect1 id="ddl-depend">

0 commit comments

Comments
 (0)