mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
doc: adjust "cities" example to be consistent with other SQL
Reported-by: tom@crystae.net Discussion: https://postgr.es/m/162345756191.14472.9754568432103008703@wrigleys.postgresql.org Backpatch-through: 9.6
This commit is contained in:
parent
feff615573
commit
437d74f498
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE VIEW myview AS
|
CREATE VIEW myview AS
|
||||||
SELECT city, temp_lo, temp_hi, prcp, date, location
|
SELECT name, temp_lo, temp_hi, prcp, date, location
|
||||||
FROM weather, cities
|
FROM weather, cities
|
||||||
WHERE city = name;
|
WHERE city = name;
|
||||||
|
|
||||||
@ -101,12 +101,12 @@ SELECT * FROM myview;
|
|||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
CREATE TABLE cities (
|
CREATE TABLE cities (
|
||||||
city varchar(80) primary key,
|
name varchar(80) primary key,
|
||||||
location point
|
location point
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE weather (
|
CREATE TABLE weather (
|
||||||
city varchar(80) references cities(city),
|
city varchar(80) references cities(name),
|
||||||
temp_lo int,
|
temp_lo int,
|
||||||
temp_hi int,
|
temp_hi int,
|
||||||
prcp real,
|
prcp real,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user