From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Amul Sul <sulamul(at)gmail(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, Tender Wang <tndrwang(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Antonin Houska <ah(at)cybertec(dot)at> |
Subject: | Re: Foreign key validation failure in 18beta1 |
Date: | 2025-06-02 16:26:29 |
Message-ID: | 202506021626.ayigld7w7mah@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
I find this coding somewhat confusing. Now you have a function
"QueueFkConstraintValidation" which may queue a FK queue constraint
validation, if the flag "queueValidation" is given, but it may also do
something else -- makes no sense IMO. I think it's better to split this
function in two; one does indeed validate, the other is a simple helper
that only sets the catalog flag, and does its own recursion. This
causes a bit of duplicate code, but is simpler to follow. (We could
also refactor the duplicate code by adding another helper routine, but
I'm not sure it's worth the trouble.)
I would propose something like this instead, what do you think?
I hate that pg_constraint.conparentid doesn't have a syscache or at
least an index :-(
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El miedo atento y previsor es la madre de la seguridad" (E. Burke)
Attachment | Content-Type | Size |
---|---|---|
v6-0001-Skip-adding-action-based-foreign-key-constraints-.patch | text/x-diff | 12.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-06-02 16:45:55 | Re: pg_upgrade: warn about roles with md5 passwords |
Previous Message | Alexander Korotkov | 2025-06-02 16:25:28 | Re: Vacuum statistics |