More < and > cleanups converted to ampersands.
authorBruce Momjian
Sat, 22 Jan 2005 22:56:36 +0000 (22:56 +0000)
committerBruce Momjian
Sat, 22 Jan 2005 22:56:36 +0000 (22:56 +0000)
22 files changed:
doc/src/sgml/backup.sgml
doc/src/sgml/datatype.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/dfunc.sgml
doc/src/sgml/dml.sgml
doc/src/sgml/ecpg.sgml
doc/src/sgml/func.sgml
doc/src/sgml/geqo.sgml
doc/src/sgml/indices.sgml
doc/src/sgml/plpgsql.sgml
doc/src/sgml/pltcl.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/query.sgml
doc/src/sgml/release.sgml
doc/src/sgml/rowtypes.sgml
doc/src/sgml/rules.sgml
doc/src/sgml/runtime.sgml
doc/src/sgml/spi.sgml
doc/src/sgml/sql.sgml
doc/src/sgml/trigger.sgml
doc/src/sgml/xaggr.sgml
doc/src/sgml/xfunc.sgml

index 76457b6842a8e91c741d6333aa15a1af82c64a04..b2309262e4a075db4d6cc90e2724a1a16abed1fa 100644 (file)
@@ -1,5 +1,5 @@
 
 
  Backup and Restore
@@ -256,7 +256,7 @@ cat filename* | psql 
      following command dumps a database using the custom dump format:
 
 
-pg_dump -Fc dbname > filename
+pg_dump -Fc dbname > filename
 
 
      A custom-format dump is not a script for psql, but
@@ -1203,14 +1203,14 @@ pg_dumpall -p 5432 | psql -d template1 -p 6543
    version, start the new server, restore the data. For example:
 
 
-pg_dumpall > backup
+pg_dumpall > backup
 pg_ctl stop
 mv /usr/local/pgsql /usr/local/pgsql.old
 cd ~/postgresql-&version;
 gmake install
 initdb -D /usr/local/pgsql/data
 postmaster -D /usr/local/pgsql/data
-psql template1 < backup
+psql template1 < backup
 
 
    See  about ways to start and stop the
index 0ca87bfb2c9a5d9f33a448173e400529a002f9b9..3794aa2f7869a0e13ccece8fa41275a063f9a760 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -1645,7 +1645,7 @@ SELECT b, char_length(b) FROM test2;
          
          
           04:05 PM
-          same as 16:05; input hour must be <= 12
+          same as 16:05; input hour must be <= 12
          
          
           04:05:06.789-8
@@ -2367,7 +2367,7 @@ SELECT * FROM test1 WHERE a;
         circle
         24 bytes
         Circle
-        <(x,y),r> (center and radius)
+        <(x,y),r> (center and radius)
        
       
      
index 727b00f0eafe5125b111fe6198dad62dddeb0a56..2de8888254fda55cad4101c87d601bc054141716 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Data Definition
@@ -275,7 +275,7 @@ CREATE TABLE products (
 CREATE TABLE products (
     product_no integer,
     name text,
-    price numeric CHECK (price > 0)
+    price numeric CHECK (price > 0)
 );
 
    
@@ -303,7 +303,7 @@ CREATE TABLE products (
 CREATE TABLE products (
     product_no integer,
     name text,
-    price numeric CONSTRAINT positive_price CHECK (price > 0)
+    price numeric CONSTRAINT positive_price CHECK (price > 0)
 );
 
     So, to specify a named constraint, use the key word
@@ -320,9 +320,9 @@ CREATE TABLE products (
 CREATE TABLE products (
     product_no integer,
     name text,
-    price numeric CHECK (price > 0),
-    discounted_price numeric CHECK (discounted_price > 0),
-    CHECK (price > discounted_price)
+    price numeric CHECK (price > 0),
+    discounted_price numeric CHECK (discounted_price > 0),
+    CHECK (price > discounted_price)
 );
 
    
@@ -350,10 +350,10 @@ CREATE TABLE products (
     product_no integer,
     name text,
     price numeric,
-    CHECK (price > 0),
+    CHECK (price > 0),
     discounted_price numeric,
-    CHECK (discounted_price > 0),
-    CHECK (price > discounted_price)
+    CHECK (discounted_price > 0),
+    CHECK (price > discounted_price)
 );
 
     or even
@@ -361,9 +361,9 @@ CREATE TABLE products (
 CREATE TABLE products (
     product_no integer,
     name text,
-    price numeric CHECK (price > 0),
+    price numeric CHECK (price > 0),
     discounted_price numeric,
-    CHECK (discounted_price > 0 AND price > discounted_price)
+    CHECK (discounted_price > 0 AND price > discounted_price)
 );
 
     It's a matter of taste.
@@ -377,10 +377,10 @@ CREATE TABLE products (
     product_no integer,
     name text,
     price numeric,
-    CHECK (price > 0),
+    CHECK (price > 0),
     discounted_price numeric,
-    CHECK (discounted_price > 0),
-    CONSTRAINT valid_discount CHECK (price > discounted_price)
+    CHECK (discounted_price > 0),
+    CONSTRAINT valid_discount CHECK (price > discounted_price)
 );
 
    
@@ -442,7 +442,7 @@ CREATE TABLE products (
 CREATE TABLE products (
     product_no integer NOT NULL,
     name text NOT NULL,
-    price numeric NOT NULL CHECK (price > 0)
+    price numeric NOT NULL CHECK (price > 0)
 );
 
     The order doesn't matter.  It does not necessarily determine in which
index 406112a3b84500bb84d0a658f44b71e0141aa85f..2c1a2771e5431562cf4cc6760ad4a3e123cfd55e 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -307,7 +307,7 @@ cc  -c foo.c
 You must then create a symbol \*(lqexports\*(rq file for the object
 file:
 .nf
-mkldexport foo.o `pwd` > foo.exp
+mkldexport foo.o `pwd` > foo.exp
 .fi
 Finally, you can create the shared library:
 .nf
index 53eeea49aa679c5af925cf4d83dffd07a83ff1ab..91e7e137f186348d36069c4c264a431d77fb59f4 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Data Manipulation
@@ -191,7 +191,7 @@ UPDATE products SET price = price * 1.10;
    UPDATE command by listing more than one
    assignment in the SET clause.  For example:
 
-UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
+UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
 
   
  
index 173c4f9c73550d68f205e11685268aa7e4e461e4..965cd75d3a6b29a39990861f4a9dece5def06f20 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -627,7 +627,7 @@ EXEC SQL EXECUTE mystmt USING 42, 'foobar';
    INTO clause:
 
 EXEC SQL BEGIN DECLARE SECTION;
-const char *stmt = "SELECT a, b, c FROM test1 WHERE a > ?";
+const char *stmt = "SELECT a, b, c FROM test1 WHERE a > ?";
 int v1, v2;
 VARCHAR v3;
 EXEC SQL END DECLARE SECTION;
index c01fad599a8c7a2eb73bca8643f2e547cfbf1754..2917cf1a445f1eca36bdc7283df007f906c6ea59 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -5890,7 +5890,7 @@ SELECT TIMESTAMP 'now';
        
          >^ 
         Is above?
-        circle '((0,5),1)' >^ circle '((0,0),1)'
+        circle '((0,5),1)' >^ circle '((0,0),1)'
        
        
          ?# 
index 5822199860d8d646360803d22fd78c140ea82c5b..cb7d2f38d13361525db5851cff7c074835d87281 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -147,7 +147,7 @@ Genetic Optimizer
 
 
 +=========================================+
-|>>>>>>>>>>>  Algorithm GA  <<<<<<<<<<<<<<|
+|>>>>>>>>>>>  Algorithm GA  <<<<<<<<<<<<<<|
 +=========================================+
 | INITIALIZE t := 0                       |
 +=========================================+
index 85cabecf055bece7d005ee554869ef96deadfd20..41f87d60f66ba984348c849941c7b5708fc63288 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Indexes
@@ -563,7 +563,7 @@ CREATE TABLE access_log (
     such as this:
 
 CREATE INDEX access_log_client_ip_ix ON access_log (client_ip)
-    WHERE NOT (client_ip > inet '192.168.100.0' AND client_ip < inet '192.168.100.255');
+    WHERE NOT (client_ip > inet '192.168.100.0' AND client_ip < inet '192.168.100.255');
 
    
 
@@ -617,12 +617,12 @@ CREATE INDEX orders_unbilled_index ON orders (order_nr)
    
     A possible query to use this index would be
 
-SELECT * FROM orders WHERE billed is not true AND order_nr < 10000;
+SELECT * FROM orders WHERE billed is not true AND order_nr < 10000;
 
     However, the index can also be used in queries that do not involve
     order_nr at all, e.g.,
 
-SELECT * FROM orders WHERE billed is not true AND amount > 5000.00;
+SELECT * FROM orders WHERE billed is not true AND amount > 5000.00;
 
     This is not as efficient as a partial index on the
     amount column would be, since the system has to
index 3a283bce5e42647e7cc91fe38c3d6fb314db4a25..64a0af6cffa749114709aed1b61177a2536acb23 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -1570,7 +1570,7 @@ END IF;
 
 
 
-IF v_count > 0 THEN 
+IF v_count > 0 THEN 
     INSERT INTO users_count (count) VALUES (v_count);
     RETURN 't';
 ELSE
@@ -3233,7 +3233,7 @@ BEGIN
 
     SELECT count(*) INTO a_running_job_count FROM cs_jobs WHERE end_stamp IS NULL;
 
-    IF a_running_job_count > 0 THEN
+    IF a_running_job_count > 0 THEN
         COMMIT; -- free lock
         raise_application_error(-20000, 'Unable to create a new job: a job is currently running.');
     END IF;
@@ -3299,7 +3299,7 @@ BEGIN
 
     SELECT count(*) INTO a_running_job_count FROM cs_jobs WHERE end_stamp IS NULL;
 
-    IF a_running_job_count > 0 THEN
+    IF a_running_job_count > 0 THEN
         RAISE EXCEPTION 'Unable to create a new job: a job is currently running';
     END IF;
 
@@ -3464,7 +3464,7 @@ DECLARE
     length integer;
     ss_length integer;
 BEGIN
-    IF beg_index > 0 THEN
+    IF beg_index > 0 THEN
         temp_str := substring(string FROM beg_index);
         pos := position(string_to_search IN temp_str);
 
@@ -3478,11 +3478,11 @@ BEGIN
         length := char_length(string);
         beg := length + beg_index - ss_length + 2;
 
-        WHILE beg > 0 LOOP
+        WHILE beg > 0 LOOP
             temp_str := substring(string FROM beg FOR ss_length);
             pos := position(string_to_search IN temp_str);
 
-            IF pos > 0 THEN
+            IF pos > 0 THEN
                 RETURN beg;
             END IF;
 
@@ -3507,7 +3507,7 @@ DECLARE
     length integer;
     ss_length integer;
 BEGIN
-    IF beg_index > 0 THEN
+    IF beg_index > 0 THEN
         beg := beg_index;
         temp_str := substring(string FROM beg_index);
 
@@ -3533,11 +3533,11 @@ BEGIN
         length := char_length(string);
         beg := length + beg_index - ss_length + 2;
 
-        WHILE beg > 0 LOOP
+        WHILE beg > 0 LOOP
             temp_str := substring(string FROM beg FOR ss_length);
             pos := position(string_to_search IN temp_str);
 
-            IF pos > 0 THEN
+            IF pos > 0 THEN
                 occur_number := occur_number + 1;
 
                 IF occur_number = occur_index THEN
index 0ba4d228590ca3f2af64369794f5cbc5ca3a3c9e..1d22035fa9b8dfa242c60bb5befae46df61fba0c 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -102,7 +102,7 @@ $$ LANGUAGE pltcl;
 
 
 CREATE FUNCTION tcl_max(integer, integer) RETURNS integer AS $$
-    if {$1 > $2} {return $1}
+    if {$1 > $2} {return $1}
     return $2
 $$ LANGUAGE pltcl STRICT;
 
@@ -129,7 +129,7 @@ CREATE FUNCTION tcl_max(integer, integer) RETURNS integer AS $$
         return $2
     }
     if {[argisnull 2]} { return $1 }
-    if {$1 > $2} {return $1}
+    if {$1 > $2} {return $1}
     return $2
 $$ LANGUAGE pltcl;
 
@@ -156,10 +156,10 @@ CREATE TABLE employee (
 );
 
 CREATE FUNCTION overpaid(employee) RETURNS boolean AS $$
-    if {200000.0 < $1(salary)} {
+    if {200000.0 < $1(salary)} {
         return "t"
     }
-    if {$1(age) < 30 && 100000.0 < $1(salary)} {
+    if {$1(age) < 30 && 100000.0 < $1(salary)} {
         return "t"
     }
     return "f"
index d2011f44574289884a89a147d91ecc59a9da60da..93323463faf7f7574495d210beee49f5da684cc4 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Queries
@@ -374,7 +374,7 @@ FROM table_reference table_r
 
      then we get the following results for the various joins:
 
-=> SELECT * FROM t1 CROSS JOIN t2;
+=> SELECT * FROM t1 CROSS JOIN t2;
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
@@ -388,28 +388,28 @@ FROM table_reference table_r
    3 | c    |   5 | zzz
 (9 rows)
 
-=> SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num;
+=> SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num;
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
    3 | c    |   3 | yyy
 (2 rows)
 
-=> SELECT * FROM t1 INNER JOIN t2 USING (num);
+=> SELECT * FROM t1 INNER JOIN t2 USING (num);
  num | name | value
 -----+------+-------
    1 | a    | xxx
    3 | c    | yyy
 (2 rows)
 
-=> SELECT * FROM t1 NATURAL INNER JOIN t2;
+=> SELECT * FROM t1 NATURAL INNER JOIN t2;
  num | name | value
 -----+------+-------
    1 | a    | xxx
    3 | c    | yyy
 (2 rows)
 
-=> SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num;
+=> SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num;
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
@@ -417,7 +417,7 @@ FROM table_reference table_r
    3 | c    |   3 | yyy
 (3 rows)
 
-=> SELECT * FROM t1 LEFT JOIN t2 USING (num);
+=> SELECT * FROM t1 LEFT JOIN t2 USING (num);
  num | name | value
 -----+------+-------
    1 | a    | xxx
@@ -425,7 +425,7 @@ FROM table_reference table_r
    3 | c    | yyy
 (3 rows)
 
-=> SELECT * FROM t1 RIGHT JOIN t2 ON t1.num = t2.num;
+=> SELECT * FROM t1 RIGHT JOIN t2 ON t1.num = t2.num;
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
@@ -433,7 +433,7 @@ FROM table_reference table_r
      |      |   5 | zzz
 (3 rows)
 
-=> SELECT * FROM t1 FULL JOIN t2 ON t1.num = t2.num;
+=> SELECT * FROM t1 FULL JOIN t2 ON t1.num = t2.num;
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
@@ -450,7 +450,7 @@ FROM table_reference table_r
      prove useful for some queries but needs to be thought out
      carefully.  For example:
 
-=> SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num AND t2.value = 'xxx';
+=> SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num AND t2.value = 'xxx';
  num | name | num | value
 -----+------+-----+-------
    1 | a    |   1 | xxx
@@ -508,7 +508,7 @@ SELECT * FROM some_very_long_table_name s JOIN another_fairly_long_name a ON s.i
      current query — it is no longer possible to refer to the table
      by the original name.  Thus
 
-SELECT * FROM my_table AS m WHERE my_table.a > 5;
+SELECT * FROM my_table AS m WHERE my_table.a > 5;
 
      is not valid SQL syntax.  What will actually happen (this is a
      PostgreSQL extension to the standard)
@@ -516,7 +516,7 @@ SELECT * FROM my_table AS m WHERE my_table.a > 5;
      FROM clause, so the query is processed as if
      it were written as
 
-SELECT * FROM my_table AS m, my_table AS my_table WHERE my_table.a > 5;
+SELECT * FROM my_table AS m, my_table AS my_table WHERE my_table.a > 5;
 
      which will result in a cross join, which is usually not what you
      want.
@@ -732,7 +732,7 @@ FROM a NATURAL JOIN b WHERE b.val > 5
    
     Here are some examples of WHERE clauses:
 
-SELECT ... FROM fdt WHERE c1 > 5
+SELECT ... FROM fdt WHERE c1 > 5
 
 SELECT ... FROM fdt WHERE c1 IN (1, 2, 3)
 
@@ -742,7 +742,7 @@ SELECT ... FROM fdt WHERE c1 IN (SELECT c3 FROM t2 WHERE c2 = fdt.c1 + 10)
 
 SELECT ... FROM fdt WHERE c1 BETWEEN (SELECT c3 FROM t2 WHERE c2 = fdt.c1 + 10) AND 100
 
-SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 > fdt.c1)
+SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 > fdt.c1)
 
     fdt is the table derived in the
     FROM clause. Rows that do not meet the search
@@ -795,7 +795,7 @@ SELECT select_list
     eliminate redundancy in the output and/or compute aggregates that
     apply to these groups.  For instance:
 
-=> SELECT * FROM test1;
+=> SELECT * FROM test1;
  x | y
 ---+---
  a | 3
@@ -804,7 +804,7 @@ SELECT select_list
  a | 1
 (4 rows)
 
-=> SELECT x FROM test1 GROUP BY x;
+=> SELECT x FROM test1 GROUP BY x;
  x
 ---
  a
@@ -827,7 +827,7 @@ SELECT select_list
     used in the grouping cannot be referenced except in aggregate
     expressions.  An example with aggregate expressions is:
 
-=> SELECT x, sum(y) FROM test1 GROUP BY x;
+=> SELECT x, sum(y) FROM test1 GROUP BY x;
  x | sum
 ---+-----
  a |   4
@@ -901,14 +901,14 @@ SELECT select_list FROM ... WHERE ...
    
     Example:
 
-=SELECT x, sum(y) FROM test1 GROUP BY x HAVING sum(y) > 3;
+=SELECT x, sum(y) FROM test1 GROUP BY x HAVING sum(y) > 3;
  x | sum
 ---+-----
  a |   4
  b |   5
 (2 rows)
 
-=SELECT x, sum(y) FROM test1 GROUP BY x HAVING x < 'c';
+=SELECT x, sum(y) FROM test1 GROUP BY x HAVING x < 'c';
  x | sum
 ---+-----
  a |   4
@@ -922,9 +922,9 @@ SELECT select_list FROM ... WHERE ...
 
 SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit
     FROM products p LEFT JOIN sales s USING (product_id)
-    WHERE s.date > CURRENT_DATE - INTERVAL '4 weeks'
+    WHERE s.date > CURRENT_DATE - INTERVAL '4 weeks'
     GROUP BY product_id, p.name, p.price, p.cost
-    HAVING sum(p.price * s.units) > 5000;
+    HAVING sum(p.price * s.units) > 5000;
 
     In the example above, the WHERE clause is selecting
     rows by a column that is not grouped (the expression is only true for
index 7478b4251f1e95e2b54aca269de54d6a523a3163..366820e5546f6fab3352bb5b820c7ab18f8e4575 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -605,8 +605,8 @@ SELECT *
 SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high,
     W2.city, W2.temp_lo AS low, W2.temp_hi AS high
     FROM weather W1, weather W2
-    WHERE W1.temp_lo < W2.temp_lo
-    AND W1.temp_hi > W2.temp_hi;
+    WHERE W1.temp_lo < W2.temp_lo
+    AND W1.temp_hi > W2.temp_hi;
 
      city      | low | high |     city      | low | high
 ---------------+-----+------+---------------+-----+------
@@ -737,7 +737,7 @@ SELECT city, max(temp_lo)
 SELECT city, max(temp_lo)
     FROM weather
     GROUP BY city
-    HAVING max(temp_lo) < 40;
+    HAVING max(temp_lo) < 40;
 
 
 
@@ -757,7 +757,7 @@ SELECT city, max(temp_lo)
     FROM weather
     WHERE city LIKE 'S%'
     GROUP BY city
-    HAVING max(temp_lo) < 40;
+    HAVING max(temp_lo) < 40;
 
    
     
@@ -814,7 +814,7 @@ SELECT city, max(temp_lo)
 
 UPDATE weather
     SET temp_hi = temp_hi - 2,  temp_lo = temp_lo - 2
-    WHERE date > '1994-11-28';
+    WHERE date > '1994-11-28';
 
    
 
index 847a4d39413980089a25eb5c5f946a17a6328b74..96f260c5a49d47ec95666b61c59e6ae6d9afa9cb 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -945,7 +945,7 @@ $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.322 2005/01/22 22:06:17 momjian
      
      
       Fixes improper failure of cases such as SELECT SUM(win)/SUM(lose)
-      ... GROUP BY ... HAVING SUM(lose) > 0.  This should work but formerly
+      ... GROUP BY ... HAVING SUM(lose) > 0.  This should work but formerly
       could fail with divide-by-zero.
      
     
@@ -2776,7 +2776,7 @@ DROP SCHEMA information_schema CASCADE;
 Force zero_damaged_pages to be on during recovery from WAL
 Prevent some obscure cases of variable not in subplan target lists
 Make PQescapeBytea and byteaout consistent with each other (Joe)
-Escape bytea output for bytes > 0x7e(Joe)
+Escape bytea output for bytes > 0x7e(Joe)
 
   If different client encodings are used for bytea output and input, it
   is possible for bytea values to be corrupted by the differing
@@ -4609,7 +4609,7 @@ DROP SCHEMA information_schema CASCADE;
     Allow libpq to compile with Borland C++ compiler (Lester Godwin, Karl Waclawek)
     Use our own version of getopt_long() if needed (Peter)
     Convert administration scripts to C (Peter)
-     Bison >= 1.85 is now required to build the PostgreSQL grammar, if building from CVS
+     Bison >= 1.85 is now required to build the PostgreSQL grammar, if building from CVS
     Merge documentation into one book (Peter)
     Add Windows compatibility functions (Bruce)
     Allow client interfaces to compile under MinGW (Bruce)
@@ -5450,7 +5450,7 @@ operations on bytea columns (Joe)
 Make cursors insensitive, meaning their contents do not change (Tom)
 Disable LIMIT #,# syntax; now only LIMIT # OFFSET # supported (Bruce)
 Increase identifier length to 63 (Neil, Bruce)
-UNION fixes for merging >= 3 columns of different lengths (Tom)
+UNION fixes for merging >= 3 columns of different lengths (Tom)
 Add DEFAULT key word to INSERT, e.g., INSERT ... (..., DEFAULT, ...) (Rod)
 Allow views to have default values using ALTER COLUMN ... SET DEFAULT (Neil)
 Fail on INSERTs with column lists that don't supply all column values, e.g., INSERT INTO tab (col1, col2) VALUES ('val1');  (Rod)
@@ -5533,7 +5533,7 @@ operations on bytea columns (Joe)
 New pg_settings table to view/modify GUC settings (Joe)
 Add smart quoting, portability improvements to pg_dump output (Peter)
 Dump serial columns out as SERIAL (Tom)
-Enable large file support, >2G for pg_dump (Peter, Philip Warner, Bruce)
+Enable large file support, >2G for pg_dump (Peter, Philip Warner, Bruce)
 Disallow TRUNCATE on tables that are involved in referential constraints (Rod)
 Have TRUNCATE also auto-truncate the toast table of the relation (Tom)
 Add clusterdb utility that will auto-cluster an entire database based on previous CLUSTER operations (Alvaro Herrera)
@@ -5597,7 +5597,7 @@ operations on bytea columns (Joe)
 Add additional encodings: Korean (JOHAB), Thai (WIN874), Vietnamese (TCVN), Arabic (WIN1256), Simplified Chinese (GBK), Korean (UHC) (Eiji Tokuya)
 Enable locale support by default (Peter)
 Add locale variables (Peter)
-Escape byes >= 0x7f for multibyte in PQescapeBytea/PQunescapeBytea (Tatsuo)
+Escape byes >= 0x7f for multibyte in PQescapeBytea/PQunescapeBytea (Tatsuo)
 Add locale awareness to regular expression character classes
 Enable multibyte support by default (Tatsuo)
 Add GB18030 multibyte support (Bill Huang)
@@ -5967,7 +5967,7 @@ since PostgreSQL 7.1.
 
 Allow EXECUTE of "CREATE TABLE AS ... SELECT" in PL/pgSQL (Tom)
 Fix for compressed transaction log id wraparound (Tom)
-Fix PQescapeBytea/PQunescapeBytea so that they handle bytes > 0x7f (Tatsuo)
+Fix PQescapeBytea/PQunescapeBytea so that they handle bytes > 0x7f (Tatsuo)
 Fix for psql and pg_dump crashing when invoked with non-existent long options (Tatsuo)
 Fix crash when invoking geometric operators (Tom)
 Allow OPEN cursor(args) (Tom)
@@ -7386,7 +7386,7 @@ Fix mismatched types in CREATE TABLE ... DEFAULT
 Fix SELECT * FROM pg_class where oid in (0,-1)
 Fix SELECT COUNT('asdf') FROM pg_class WHERE oid=12
 Prevent user who can create databases can modifying pg_database table (Peter E)
-Fix btree to give a useful elog when key > 1/2 (page - overhead) (Tom)
+Fix btree to give a useful elog when key > 1/2 (page - overhead) (Tom)
 Fix INSERT of 0.0 into DECIMAL(4,4) field (Tom)
 
 Enhancements
@@ -7595,7 +7595,7 @@ Fewer fsync writes when fsync is not disabled (Tom)
 Improved LIKE optimizer estimates (Tom)
 Prevent fsync in SELECT-only queries (Vadim)
 Make index creation use psort code, because it is now faster (Tom)
-Allow creation of sort temp tables > 1 Gig
+Allow creation of sort temp tables > 1 Gig
 
 Source Tree Changes
 -------------------
@@ -9225,7 +9225,7 @@ Check explicitly for points and polygons contained within polygons
         using an axis-crossing algorithm(Thomas)
 Add routine to convert circle-box(Thomas)
 Merge conflicting operators for different geometric data types(Thomas)
-Replace distance operator "<===>" with "<->"(Thomas)
+Replace distance operator "<===>" with "<->"(Thomas)
 Replace "above" operator "!^" with ">^" and "below" operator "!|" with "<^"(Thomas)
 Add routines for text trimming on both ends, substring, and string position(Thomas)
 Added conversion routines circle(box) and poly(circle)(Thomas)
index 2cc935db173adbbffd9e1a86aaca897a942a7cf7..e2bfab2b8d8edab1f3489e71416142959a913fe1 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Composite Types
@@ -75,7 +75,7 @@ SELECT price_extension(item, 10) FROM on_hand;
 CREATE TABLE inventory_item (
     name            text,
     supplier_id     integer REFERENCES suppliers,
-    price           numeric CHECK (price > 0)
+    price           numeric CHECK (price > 0)
 );
 
   then the same inventory_item composite type shown above would
@@ -165,21 +165,21 @@ ROW('', 42, NULL)
   like:
 
 
-SELECT item.name FROM on_hand WHERE item.price > 9.99;
+SELECT item.name FROM on_hand WHERE item.price > 9.99;
 
 
   This will not work since the name item is taken to be a table
   name, not a field name, per SQL syntax rules.  You must write it like this:
 
 
-SELECT (item).name FROM on_hand WHERE (item).price > 9.99;
+SELECT (item).name FROM on_hand WHERE (item).price > 9.99;
 
 
   or if you need to use the table name as well (for instance in a multi-table
   query), like this:
 
 
-SELECT (on_hand.item).name FROM on_hand WHERE (on_hand.item).price > 9.99;
+SELECT (on_hand.item).name FROM on_hand WHERE (on_hand.item).price > 9.99;
 
 
   Now the parenthesized object is correctly interpreted as a reference to
index c04ce33841c071816402f832c390fb8d79228aab..513b5f28d6fdd7e78b239915bd2f3d8f5d6c47e8 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
 The Rule System
@@ -344,7 +344,7 @@ returns the lower of 2 integer values. We create that as
 
 
 CREATE FUNCTION min(integer, integer) RETURNS integer AS $$
-    SELECT CASE WHEN $1 < $2 THEN $1 ELSE $2 END
+    SELECT CASE WHEN $1 < $2 THEN $1 ELSE $2 END
 $$ LANGUAGE SQL STRICT;
 
 
@@ -414,8 +414,8 @@ CREATE VIEW shoe_ready AS
            min(rsh.sh_avail, rsl.sl_avail) AS total_avail
       FROM shoe rsh, shoelace rsl
      WHERE rsl.sl_color = rsh.slcolor
-       AND rsl.sl_len_cm >= rsh.slminlen_cm
-       AND rsl.sl_len_cm <= rsh.slmaxlen_cm;
+       AND rsl.sl_len_cm >= rsh.slminlen_cm
+       AND rsl.sl_len_cm <= rsh.slmaxlen_cm;
 
 
     The CREATE VIEW command for the
@@ -558,7 +558,7 @@ SELECT shoelace.sl_name, shoelace.sl_avail,
     total number of exactly matching pairs is greater or equal to two.
 
 
-SELECT * FROM shoe_ready WHERE total_avail >= 2;
+SELECT * FROM shoe_ready WHERE total_avail >= 2;
 
  shoename | sh_avail | sl_name | sl_avail | total_avail
 ----------+----------+---------+----------+-------------
@@ -576,7 +576,7 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail,
        shoe_ready.sl_name, shoe_ready.sl_avail,
        shoe_ready.total_avail
   FROM shoe_ready shoe_ready
- WHERE shoe_ready.total_avail >= 2;
+ WHERE shoe_ready.total_avail >= 2;
 
 
     The first rule applied will be the one for the 
@@ -594,9 +594,9 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail,
                min(rsh.sh_avail, rsl.sl_avail) AS total_avail
           FROM shoe rsh, shoelace rsl
          WHERE rsl.sl_color = rsh.slcolor
-           AND rsl.sl_len_cm >= rsh.slminlen_cm
-           AND rsl.sl_len_cm <= rsh.slmaxlen_cm) shoe_ready
- WHERE shoe_ready.total_avail >= 2;
+           AND rsl.sl_len_cm >= rsh.slminlen_cm
+           AND rsl.sl_len_cm <= rsh.slmaxlen_cm) shoe_ready
+ WHERE shoe_ready.total_avail >= 2;
 
 
     Similarly, the rules for shoe and
@@ -631,9 +631,9 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail,
                   FROM shoelace_data s, unit u
                  WHERE s.sl_unit = u.un_name) rsl
          WHERE rsl.sl_color = rsh.slcolor
-           AND rsl.sl_len_cm >= rsh.slminlen_cm
-           AND rsl.sl_len_cm <= rsh.slmaxlen_cm) shoe_ready
- WHERE shoe_ready.total_avail > 2;
+           AND rsl.sl_len_cm >= rsh.slminlen_cm
+           AND rsl.sl_len_cm <= rsh.slmaxlen_cm) shoe_ready
+ WHERE shoe_ready.total_avail > 2;
 
    
 
@@ -1958,14 +1958,14 @@ Nestloop
     is
 
 
-DELETE FROM computer WHERE hostname >= 'old'
-                       AND hostname <  'ole'
+DELETE FROM computer WHERE hostname >= 'old'
+                       AND hostname <  'ole'
 
 
     The command added by the rule will be
 
 
-DELETE FROM software WHERE computer.hostname >= 'old' AND computer.hostname < 'ole'
+DELETE FROM software WHERE computer.hostname >= 'old' AND computer.hostname < 'ole'
                        AND software.hostname = computer.hostname;
 
 
index 49148f16c2917c7637ced0683f3a0db1edcefcac..3e3ce6e866748c3fa2442266a710b3871fb8a53e 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -4420,8 +4420,8 @@ options         SEMMAP=256
         proc file system (without reboot).  For
         example, to allow 128 MB:
 
-$ echo 134217728 >/proc/sys/kernel/shmall
-$ echo 134217728 >/proc/sys/kernel/shmmax
+$ echo 134217728 >/proc/sys/kernel/shmall
+$ echo 134217728 >/proc/sys/kernel/shmmax
 
         You could put these commands into a script run at boot-time.
        
index 1994f7230cdf6c68cfeecee7335256fb0d468495..86949a9a4390e69af9c19154574bcb1657d61bb8 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -2929,18 +2929,18 @@ execq(text *sql, int cnt)
      * If this is a SELECT and some rows were fetched,
      * then the rows are printed via elog(INFO).
      */
-    if (ret == SPI_OK_SELECT && SPI_processed > 0)
+    if (ret == SPI_OK_SELECT && SPI_processed > 0)
     {
         TupleDesc tupdesc = SPI_tuptable->tupdesc;
         SPITupleTable *tuptable = SPI_tuptable;
         char buf[8192];
         int i, j;
         
-        for (j = 0; j < proc; j++)
+        for (j = 0; j < proc; j++)
         {
             HeapTuple tuple = tuptable->vals[j];
             
-            for (i = 1, buf[0] = 0; i <= tupdesc->natts; i++)
+            for (i = 1, buf[0] = 0; i <= tupdesc->natts; i++)
                 snprintf(buf + strlen (buf), sizeof(buf) - strlen(buf), " %s%s",
                         SPI_getvalue(tuple, tupdesc, i),
                         (i == tupdesc->natts) ? " " : " |");
@@ -2976,15 +2976,15 @@ CREATE FUNCTION execq(text, integer) RETURNS integer
    Here is a sample session:
 
 
-=> SELECT execq('CREATE TABLE a (x integer)', 0);
+=> SELECT execq('CREATE TABLE a (x integer)', 0);
  execq
 -------
      0
 (1 row)
 
-=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)', 0));
+=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)', 0));
 INSERT 167631 1
-=> SELECT execq('SELECT * FROM a', 0);
+=> SELECT execq('SELECT * FROM a', 0);
 INFO:  EXECQ:  0    -- inserted by execq
 INFO:  EXECQ:  1    -- returned by execq and inserted by upper INSERT
 
@@ -2993,13 +2993,13 @@ INFO:  EXECQ:  1    -- returned by execq and inserted by upper INSERT
      2
 (1 row)
 
-=> SELECT execq('INSERT INTO a SELECT x + 2 FROM a', 1);
+=> SELECT execq('INSERT INTO a SELECT x + 2 FROM a', 1);
  execq
 -------
      1
 (1 row)
 
-=> SELECT execq('SELECT * FROM a', 10);
+=> SELECT execq('SELECT * FROM a', 10);
 INFO:  EXECQ:  0
 INFO:  EXECQ:  1
 INFO:  EXECQ:  2    -- 0 + 2, only one row inserted - as specified
@@ -3009,20 +3009,20 @@ INFO:  EXECQ:  2    -- 0 + 2, only one row inserted - as specified
      3              -- 10 is the max value only, 3 is the real number of rows
 (1 row)
 
-=> DELETE FROM a;
+=> DELETE FROM a;
 DELETE 3
-=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
+=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
 INSERT 167712 1
-=> SELECT * FROM a;
+=> SELECT * FROM a;
  x
 ---
  1                  -- no rows in a (0) + 1
 (1 row)
 
-=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
+=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1);
 INFO:  EXECQ:  0
 INSERT 167713 1
-=> SELECT * FROM a;
+=> SELECT * FROM a;
  x
 ---
  1
@@ -3031,14 +3031,14 @@ INSERT 167713 1
 
 -- This demonstrates the data changes visibility rule:
 
-=> INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a;
+=> INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a;
 INFO:  EXECQ:  1
 INFO:  EXECQ:  2
 INFO:  EXECQ:  1
 INFO:  EXECQ:  2
 INFO:  EXECQ:  2
 INSERT 0 2
-=> SELECT * FROM a;
+=> SELECT * FROM a;
  x
 ---
  1
index 47b47e79757993202ebde61b32d7093305502c9d..b85820c8b104f49f6b453866f22cd42f7a3bfd59 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -891,7 +891,7 @@ SELECT [ ALL | DISTINCT [ ON ( expression
 
    
 SELECT * FROM PART
-    WHERE PRICE > 10;
+    WHERE PRICE > 10;
    
 
    and get the table:
@@ -913,7 +913,7 @@ SELECT * FROM PART
    
 SELECT PNAME, PRICE 
     FROM PART
-    WHERE PRICE > 10;
+    WHERE PRICE > 10;
    
 
    In this case the result is:
@@ -939,7 +939,7 @@ SELECT PNAME, PRICE
 SELECT PNAME, PRICE 
     FROM PART
     WHERE PNAME = 'Bolt' AND
-         (PRICE = 0 OR PRICE <= 15);
+         (PRICE = 0 OR PRICE <= 15);
    
 
    will lead to the result:
@@ -959,7 +959,7 @@ SELECT PNAME, PRICE
    
 SELECT PNAME, PRICE * 2 AS DOUBLE
     FROM PART
-    WHERE PRICE * 2 < 50;
+    WHERE PRICE * 2 < 50;
    
 
    and we get:
@@ -1450,7 +1450,7 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO)
     FROM SUPPLIER S, SELLS SE
     WHERE S.SNO = SE.SNO
     GROUP BY S.SNO, S.SNAME
-    HAVING COUNT(SE.PNO) > 1;
+    HAVING COUNT(SE.PNO) > 1;
    
 
    and get:
@@ -1487,7 +1487,7 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO)
    
 SELECT * 
     FROM PART 
-    WHERE PRICE > (SELECT PRICE FROM PART
+    WHERE PRICE > (SELECT PRICE FROM PART
                    WHERE PNAME='Screw');
    
        
@@ -1617,11 +1617,11 @@ gives the result:
    
 SELECT S.SNO, S.SNAME, S.CITY
     FROM SUPPLIER S
-    WHERE S.SNO > 1
+    WHERE S.SNO > 1
 INTERSECT
     SELECT S.SNO, S.SNAME, S.CITY
     FROM SUPPLIER S
-    WHERE S.SNO < 3;
+    WHERE S.SNO < 3;
    
 
    gives the result:
@@ -1641,11 +1641,11 @@ INTERSECT
    
 SELECT S.SNO, S.SNAME, S.CITY
     FROM SUPPLIER S
-    WHERE S.SNO > 1
+    WHERE S.SNO > 1
 EXCEPT
     SELECT S.SNO, S.SNAME, S.CITY
     FROM SUPPLIER S
-    WHERE S.SNO > 3;
+    WHERE S.SNO > 3;
    
 
    gives the result:
index 0708e0b2499832754e18005460161301e5d60588..5960ff93ad560d8e45b570280a1a8def7578cbfa 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -572,13 +572,13 @@ trigf(PG_FUNCTION_ARGS)
     tupdesc = trigdata->tg_relation->rd_att;
 
     /* connect to SPI manager */
-    if ((ret = SPI_connect()) < 0)
+    if ((ret = SPI_connect()) < 0)
         elog(INFO, "trigf (fired %s): SPI_connect returned %d", when, ret);
 
     /* get number of rows in table */
     ret = SPI_exec("SELECT count(*) FROM ttest", 0);
 
-    if (ret < 0)
+    if (ret < 0)
         elog(NOTICE, "trigf (fired %s): SPI_exec returned %d", when, ret);
 
     /* count(*) returns int8, so be careful to convert */
@@ -622,57 +622,57 @@ CREATE TRIGGER tafter AFTER INSERT OR UPDATE OR DELETE ON ttest
    
     Now you can test the operation of the trigger:
 
-=> INSERT INTO ttest VALUES (NULL);
+=> INSERT INTO ttest VALUES (NULL);
 INFO:  trigf (fired before): there are 0 rows in ttest
 INSERT 0 0
 
 -- Insertion skipped and AFTER trigger is not fired
 
-=> SELECT * FROM ttest;
+=> SELECT * FROM ttest;
  x
 ---
 (0 rows)
 
-=> INSERT INTO ttest VALUES (1);
+=> INSERT INTO ttest VALUES (1);
 INFO:  trigf (fired before): there are 0 rows in ttest
 INFO:  trigf (fired after ): there are 1 rows in ttest
                                        ^^^^^^^^
                              remember what we said about visibility.
 INSERT 167793 1
-vac=> SELECT * FROM ttest;
+vac=> SELECT * FROM ttest;
  x
 ---
  1
 (1 row)
 
-=> INSERT INTO ttest SELECT x * 2 FROM ttest;
+=> INSERT INTO ttest SELECT x * 2 FROM ttest;
 INFO:  trigf (fired before): there are 1 rows in ttest
 INFO:  trigf (fired after ): there are 2 rows in ttest
                                        ^^^^^^
                              remember what we said about visibility.
 INSERT 167794 1
-=> SELECT * FROM ttest;
+=> SELECT * FROM ttest;
  x
 ---
  1
  2
 (2 rows)
 
-=> UPDATE ttest SET x = NULL WHERE x = 2;
+=> UPDATE ttest SET x = NULL WHERE x = 2;
 INFO:  trigf (fired before): there are 2 rows in ttest
 UPDATE 0
-=> UPDATE ttest SET x = 4 WHERE x = 2;
+=> UPDATE ttest SET x = 4 WHERE x = 2;
 INFO:  trigf (fired before): there are 2 rows in ttest
 INFO:  trigf (fired after ): there are 2 rows in ttest
 UPDATE 1
-vac=> SELECT * FROM ttest;
+vac=> SELECT * FROM ttest;
  x
 ---
  1
  4
 (2 rows)
 
-=> DELETE FROM ttest;
+=> DELETE FROM ttest;
 INFO:  trigf (fired before): there are 2 rows in ttest
 INFO:  trigf (fired after ): there are 1 rows in ttest
 INFO:  trigf (fired before): there are 1 rows in ttest
@@ -680,7 +680,7 @@ INFO:  trigf (fired after ): there are 0 rows in ttest
                                        ^^^^^^
                              remember what we said about visibility.
 DELETE 2
-=> SELECT * FROM ttest;
+=> SELECT * FROM ttest;
  x
 ---
 (0 rows)
index 8cb093200383778d604e4e1bac543c1cdbc29810..d9c41714dff7c3743934662df20943528521bed7 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -141,7 +141,7 @@ CREATE AGGREGATE array_accum (
 
 SELECT attrelid::regclass, array_accum(attname)
     FROM pg_attribute
-    WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
+    WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
     GROUP BY attrelid;
 
  attrelid |                                 array_accum
@@ -151,7 +151,7 @@ SELECT attrelid::regclass, array_accum(attname)
 
 SELECT attrelid::regclass, array_accum(atttypid)
     FROM pg_attribute
-    WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
+    WHERE attnum > 0 AND attrelid = 'pg_user'::regclass
     GROUP BY attrelid;
 
  attrelid |         array_accum
index cc03bb9af4447963765852b12fddc48f32f6837b..821b5353c43d3fdfdd872cf5df684553b2cdc97d 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -678,7 +678,7 @@ ERROR:  could not determine "anyarray"/"anyelement" type because input has type
      return type, but the converse is not. For example:
 
 CREATE FUNCTION is_greater(anyelement, anyelement) RETURNS boolean AS $$
-    SELECT $1 > $2;
+    SELECT $1 > $2;
 $$ LANGUAGE SQL;
 
 SELECT is_greater(1, 2);