v.24.4New Feature

Added Role Query Parameter to HTTP Interface for Enhanced Statement Execution

Added role query parameter to the HTTP interface. It works similarly to SET 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 both SET ROLE x and 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 of SET ROLE x, y. #62669 (Serge Klochkov).
Added the role query parameter to the HTTP interface, enabling users to apply one or multiple roles before executing a statement.

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 of SET ROLE commands, thus simplifying role-based access control during HTTP requests.

How to use it

You can specify one or more roles by adding the role 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.