Doc: typo in ddl.sgml - Mailing list pgsql-hackers

From kasaharatt
Subject Doc: typo in ddl.sgml
Date
Msg-id 84c1305f471bb5f73b4b407b4c2de64c@oss.nttdata.com
Whole thread Raw
Responses Re: Doc: typo in ddl.sgml
List pgsql-hackers
Hi.

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.
See bellow.

Best reghards,

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 898b6dd..c0de169 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -1269,9 +1269,9 @@ CREATE TABLE users (
  CREATE TABLE posts (
      tenant_id integer REFERENCES tenants ON DELETE CASCADE,
      post_id integer NOT NULL,
-    author_id integer,
+    user_id integer,
      PRIMARY KEY (tenant_id, post_id),
-    FOREIGN KEY (tenant_id, author_id) REFERENCES users ON DELETE SET 
NULL <emphasis>(author_id)</emphasis>
+    FOREIGN KEY (tenant_id, user_id) REFERENCES users ON DELETE SET 
NULL <emphasis>(user_id)</emphasis>
  );
  </programlisting>
      Without the specification of the column, the foreign key would also 
set



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY
Next
From: Tatsuo Ishii
Date:
Subject: Re: Fix for Extra Parenthesis in pgbench progress message