Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT - Mailing list pgsql-hackers

From Matheus de Oliveira
Subject Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT
Date
Msg-id CAJghg4+hcKC2RQhZBgAWmg+=+JWxShtw_WgXRN1x0rFU39C5SA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT
List pgsql-hackers
Hi All,

I've took some time today to rebase the patch with master. Follows attached.

I'm still not sure if the chosen path is the best way. But I'd be glad to follow any directions we all see fit.

For now, this patch applies two methods:
1. Changes full constraint definition (which keeps compatibility with current ALTER CONSTRAINT):
    ALTER CONSTRAINT [<on_update>] [<on_delete>] [<deferrability>]
2. Changes only the subset explicit seem in the command (a new way, I've chosen to just add SET in the middle, similar to `ALTER COLUMN ... SET {DEFAULT | NOT NULL}` ):
    ALTER CONSTRAINT SET [<on_update>] [<on_delete>] [<deferrability>]

I'm OK with changing the approach, we just need to chose the color :D

I believe this is a small change in source code, but with huge impact for users with big tables. Would be great if it could go in PG 13.

Best regards,
--
Matheus de Oliveira


Attachment

pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Next
From: Tomas Vondra
Date:
Subject: Re: PATCH: add support for IN and @> in functional-dependencystatistics use