v.24.4New Feature
Added Role Query Parameter to HTTP Interface for Enhanced Statement Execution
Addedrolequery parameter to the HTTP interface. It works similarly toSET ROLE x, applying the role before the statement is executed. This allows for overcoming the limitation of the HTTP interface, as multiple statements are not allowed, and it is not possible to send bothSET ROLE xand the statement itself at the same time. It is possible to set multiple roles that way, e.g.,?role=x&role=y, which will be an equivalent ofSET ROLE x, y. #62669 (Serge Klochkov).
Why it matters
This feature addresses the limitation of the HTTP interface where multiple statements cannot be executed simultaneously. It allows users to set roles directly via the query parameter, replicating the effect ofSET ROLE commands, thus simplifying role-based access control during HTTP requests.How to use it
You can specify one or more roles by adding therole query parameters to your HTTP request URL, for example: ?role=x&role=y. This will apply the roles as if you executed SET ROLE x, y before running your query.