Re: [HACKERS] GSoC 2017: Foreign Key Arrays - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Date
Msg-id CALNJ-vQeaH1Cv=T3jwM6PpTRon24wgLgGjq57qZpF6zZm-b6cA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Mark Rofail <markm.rofail@gmail.com>)
Responses Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Mark Rofail <markm.rofail@gmail.com>)
List pgsql-hackers
Hi, Mark:

+       if (ARR_NDIM(arr) != 1 ||
+           ARR_HASNULL(arr) ||
+           ARR_ELEMTYPE(arr) != CHAROID)
+           elog(ERROR, "confreftype is not a 1-D char array");

I think the ARR_HASNULL(arr) condition is not reflected in the error message.

+    * Array foreign keys support only UPDATE/DELETE NO ACTION, UPDATE/DELETE
+    * RESTRICT amd DELETE CASCADE actions

I don't see CASCADE in the if condition that follows the above comment.

+   char        reftype;        /* FKCONSTR_REF_xxx code */

The code would be FKCONSTR_REF_EACH_ELEMENT and FKCONSTR_REF_PLAIN. I think you can mention them in the comment.

Cheers

On Wed, Jan 27, 2021 at 11:34 AM Mark Rofail <markm.rofail@gmail.com> wrote:
Hello Joel,
 
I think you forgot to attach the patch.
Appears so, sorry about that.

Here it is. 

/Mark

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Perform COPY FROM encoding conversions in larger chunks
Next
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Enhance traceability of wal_level changes for backup management