From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | kasaharatt <kasaharatt(at)oss(dot)nttdata(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Doc: typo in ddl.sgml |
Date: | 2024-11-07 05:47:35 |
Message-ID: | CAKFQuwZ+x7qAeEpD3y9iy0hL6_S1CCn=QKG50NhP5h4q7fbW8w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wednesday, November 6, 2024, kasaharatt <kasaharatt(at)oss(dot)nttdata(dot)com>
wrote:.
>
>
> I noticed that it seems to me a mistake in the sample code in the document.
> https://www.postgresql.org/docs/devel/ddl-constraints.html#
> DDL-CONSTRAINTS-FK
>
> I think it is a typo for user_id instead of author_id.
It’s hard to argue a typo when three different places need to be changed,
and the example is fully functional as-is.
The example writer intentionally chose to make author_id the FK of the PK
user_id column in order to reduce ambiguity as to which column is on the FK
table and which is on the PK table. And to emphasize that the columns need
not be named the same in any case.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrei Lepikhov | 2024-11-07 05:57:46 | Re: Incremental Sort Cost Estimation Instability |
Previous Message | Tatsuo Ishii | 2024-11-07 05:42:13 | Re: Fix for Extra Parenthesis in pgbench progress message |