v.25.3Improvement

Add PROFILES a, DROP ALL PROFILES because

This PR makes it impossible to run a query ALTER USER user1 ADD PROFILES a, DROP ALL PROFILES because all DROP operations should come first in the order. #76242 (pufit).
Restricts the order of profile modification operations in ALTER USER queries, requiring that all DROP PROFILE actions appear before any ADD PROFILE actions.

Why it matters

This feature prevents ambiguous or conflicting behavior in user profile modifications by enforcing a clear and consistent ordering rule in the ALTER USER command. It ensures that profile removals happen before additions, which improves query reliability and predictability.

How to use it

When using the ALTER USER query to modify user profiles, make sure to list all DROP PROFILE operations first, followed by any ADD PROFILE operations. For example:

ALTER USER user1 DROP PROFILE profile1, ADD PROFILE profile2;