Re: 3.3. Foreign Keys
От | Kirk Parker |
---|---|
Тема | Re: 3.3. Foreign Keys |
Дата | |
Msg-id | CANwZ8r==nBvgykWGZXRF6_L+_p4wicoT+SkjxAqBfnvAWv_j0w@mail.gmail.com обсуждение исходный текст |
Ответ на | 3.3. Foreign Keys (PG Doc comments form <noreply@postgresql.org>) |
Ответы |
Re: 3.3. Foreign Keys
|
Список | pgsql-docs |
On Tue, Mar 11, 2025, 02:37 PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/tutorial-fk.html
Description:
While going through the documentation in a sequential manner, attempting to
create TABLE cities creates an error as “relation cities” already exists.
I am still figuring out how to proceed to create the referential rule.
Thanks,
If you've been working through the tutorial sequentially in the same database and not "cleaning up" after your previous chapters, then indeed the 'cities' table already exists because you created it in chapter 2.
Part of the (implicit or explicit?) style guide of the tutorial is that each chapter should be comprehensible on its own. The reader might have arrived there through a web search rather than linearly, and the opening sentence "Recall the
weather
and cities
tables from Chapter 2..." is meant as a casual hint that the results of those earlier chapters might persist. I'm not sure we want to engage in more detailed or formalistic set of warnings at the expense of readability of the current chapter -- for example by saying "your first need to drop these tables if they still exist from being created in a previous chapter".В списке pgsql-docs по дате отправления: