doc: Change table alias names to lower case in tutorial chapter
authorPeter Eisentraut
Fri, 4 Sep 2020 06:45:57 +0000 (08:45 +0200)
committerPeter Eisentraut
Fri, 4 Sep 2020 06:45:57 +0000 (08:45 +0200)
This is needlessly different from our usual style otherwise.

Author: Jürgen Purtz 
Discussion: https://www.postgresql.org/message-id/flat/158996922318.7035.10603922579567326239@wrigleys.postgresql.org

doc/src/sgml/query.sgml
src/tutorial/basics.source

index 497aae416b343d2b7c6954b776f715bbbfcb758d..e73e805ec4f5fd939d7264bad9e0c439e7e82ed4 100644 (file)
@@ -609,11 +609,11 @@ SELECT *
     following query:
 
 
-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;
+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;
 
 
 
@@ -624,8 +624,8 @@ SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high,
 (2 rows)
 
 
-    Here we have relabeled the weather table as W1 and
-    W2 to be able to distinguish the left and right side
+    Here we have relabeled the weather table as w1 and
+    w2 to be able to distinguish the left and right side
     of the join.  You can also use these kinds of aliases in other
     queries to save some typing, e.g.:
 
index 9dbd75eb154b4953f6ff96df02fba4268dd33a2f..fe1cdfde2a8732f78b532c563a3cc212e7b7f66e 100644 (file)
@@ -126,13 +126,13 @@ SELECT *
     FROM weather LEFT OUTER JOIN cities ON (weather.city = cities.name);
 
 -- Suppose we want to find all the records that are in the temperature range
--- of other records.  W1 and W2 are aliases for weather.
+-- of other records.  w1 and w2 are aliases for weather.
 
-SELECT W1.city, W1.temp_lo, W1.temp_hi,
-       W2.city, W2.temp_lo, W2.temp_hi
-FROM weather W1, weather W2
-WHERE W1.temp_lo < W2.temp_lo
-   and W1.temp_hi > W2.temp_hi;
+SELECT w1.city, w1.temp_lo, w1.temp_hi,
+       w2.city, w2.temp_lo, w2.temp_hi
+FROM weather w1, weather w2
+WHERE w1.temp_lo < w2.temp_lo
+   and w1.temp_hi > w2.temp_hi;
 
 
 -----------------------------