On Tue, Mar 11, 2025, 02:37 PG Doc comments form <nore...@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
<https://www.postgresql.org/docs/17/tutorial-sql.html>..." 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".

Reply via email to