Support Setting PostgreSQL (SET) Variables

Within the Advanced tab of a Resource Query, add the ability to SET sql variables before a sql command is executed. For example:

SET my.user.activeUserId = {{localStorage.values.activeUserId}};

For example: This can be very useful for things like row security policies where we can use a session variable to only show rows that belong to the active user.

Row Security Policies are a great feature of PostgreSQL and it would be great if we could leverage them in Retool.

1 Like

Thanks for the feedback! I'll post here when this is something we're able to support

Hi @erichosick This feature should be shipping soon! It's set to go out in Retool v2.125, which will be available next week

Thanks again for your feedback!