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,
--