Modulo other issues/discussions, here is a version of this patch that
implements CREATE OR REPLACE ROLE just by handing off to AlterRole if it's
determined that the role already exists; presumably any/all additional
considerations would need to be added in both places were there a separate
code path for this.

It might be worth refactoring the AlterRole into a helper if there are any
deviations in messages, etc, but could be a decent approach to handling the
problem (which arguably would have similar restrictions/requirements in
ALTER ROLE itself) in a single location.

Best,

David

Attachment: CREATE-OR-REPLACE-ROLE.patch
Description: Binary data

Reply via email to