Seems a mistake in tutorial-7.2-A4.pdf file

Started by Cepera - n/a -about 24 years ago2 messagesdocs
Jump to latest
#1Cepera - n/a -
cepera@hotmail.com

Hi,

I'm learning psql reading tutorial-7.2-A4.pdf file and doing
exercise from this document.
It seems there is a mistake in it.
On pages 14-15 of mentioned document it's written:

...<page 14>
The new declaration of the tables would look like this:

CREATE TABLE cities (
name varchar(80) primary key,
location point
);
14
...<page 15>
Chapter 3. Advanced Features

CREATE TABLE weather (
city varchar(80) references weather,
temp_lo int,
temp_hi int,
prcp real,
date date
);

Now try inserting an invalid record:
...

IMHO line `city varchar(80) references weather,'
must be `city varchar(80) references cities,'.

Best regards,
Serge.

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Cepera - n/a - (#1)
Re: Seems a mistake in tutorial-7.2-A4.pdf file

"Cepera - n/a -" <cepera@hotmail.com> writes:

IMHO line `city varchar(80) references weather,'
must be `city varchar(80) references cities,'.

Yup, you're right. This is fixed in current sources (for 7.3).
Thanks...

regards, tom lane