I am creating a portable SQL script. The CURRENT_USER may vary but I want to always grant role X to them. I have tried the following which fail:
GRANT ROLE X to CURRENT_USER;
GRANT ROLE X to CURRENT_USER();
both with
Syntax error: unexpected 'CURRENT_USER'. (line 1)
Is there a way to do this?
You need to sign in to view this answers
Leave feedback about this