Can I set the session state before running the actual query?
In order the view to return proper data it expects the session sets some parameters using stored procedure. Only after they are set I can query the view.
Is there any possibility in Play-SQL to achieve that?
It could be running two queries one after another. The first query calling a proper function setting the sessions's state and the second the actual one calling the data.
I use standalone version. Initialization SQL works perfectly fine - actually I put PL/SQL code there (I link to the Oracle database) and it also worked OK.
I was hoping for something per individual query rather than per connection. I guess that could be a feature request.
As far as I am concerned, this issue can be closed .
Are you using the cloud (*.atlassian.net) or the downloaded version of Confluence?
In the cloud it isn't possible to do that.
In Confluence Server, you can change the settings of the connection (at the space or global level only) and set an "Initialization query" that runs before any other query.