Minor copy-editing.
authorTom Lane
Wed, 5 Nov 2003 00:05:32 +0000 (00:05 +0000)
committerTom Lane
Wed, 5 Nov 2003 00:05:32 +0000 (00:05 +0000)
doc/src/sgml/ddl.sgml

index e224d3c513912fe9c5bf80bfaf97ff00ef059c93..627f25096b4fa36d032ef511cf3d5fca65eae5bf 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Data Definition
@@ -12,8 +12,7 @@
   Subsequently, we discuss how tables can be organized into
   schemas, and how privileges can be assigned to tables.  Finally,
   we will briefly look at other features that affect the data storage,
-  such as views, functions, and triggers.  Detailed information on
-  these topics is found in .
+  such as views, functions, and triggers.
  
 
  
@@ -522,7 +521,7 @@ CREATE TABLE products (
    
     It should be noted that a check constraint is satisfied if the
     check expression evaluates to true or the null value.  Since most
-    expressions will evaluate to the null value if one operand is null
+    expressions will evaluate to the null value if one operand is null,
     they will not prevent null values in the constrained columns.  To
     ensure that a column does not contain null values, the not-null
     constraint described in the next section should be used.
@@ -586,7 +585,7 @@ CREATE TABLE products (
     The NULL constraint is not defined in the SQL
     standard and should not be used in portable applications.  (It was
     only added to PostgreSQL to be
-    compatible with other database systems.)  Some users, however,
+    compatible with some other database systems.)  Some users, however,
     like it because it makes it easy to toggle the constraint in a
     script file.  For example, you could start with
 
@@ -820,7 +819,7 @@ CREATE TABLE orders (
 );
 
     because in absence of a column list the primary key of the
-    referenced table is used as referenced column.
+    referenced table is used as the referenced column.
    
 
    
@@ -1094,9 +1093,10 @@ WHERE c.altitude > 500 and c.tableoid = p.oid;
    Deprecated 
    
      In previous versions of PostgreSQL, the
-     default was not to get access to child tables. This was found to
-     be error prone and is also in violation of the SQL99 standard. Under the old
-     syntax, to get the sub-tables you append * to the table name.
+     default behavior was not to include child tables in queries. This was
+     found to be error prone and is also in violation of the SQL99
+     standard. Under the old syntax, to get the sub-tables you append
+     * to the table name.
      For example
 
 SELECT * from cities*;
@@ -1270,6 +1270,12 @@ ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;
 
 ALTER TABLE products DROP CONSTRAINT some_name;
 
+    (If you are dealing with a generated constraint name like $2,
+    don't forget that you'll need to double-quote it to make it a valid
+    identifier.)
+   
+
+   
     This works the same for all constraint types except not-null
     constraints. To drop a not null constraint use
 
@@ -1739,9 +1745,11 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
     A user can also be allowed to create objects in someone else's
     schema.  To allow that, the CREATE privilege on
     the schema needs to be granted.  Note that by default, everyone
-    has the CREATE privilege on the schema
-    public.  This allows all users that manage to
-    connect to a given database to create objects there.  If you do
+    has CREATE and USAGE privileges on
+    the schema 
+    public.  This allows all users that are able to
+    connect to a given database to create objects in its
+    public schema.  If you do
     not want to allow that, you can revoke that privilege:
 
 REVOKE CREATE ON SCHEMA public FROM PUBLIC;
@@ -1905,6 +1913,11 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
     
    
   
+
+  
+   Detailed information on
+   these topics appears in .
+