Good day! I am writing a stored function for Postgre as a C ++ Qt library. Among other things, this library will have to be able to make queries to the database from which it was called. If you enter the login, password and database in the code, such as this:
QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL"); db.setDatabaseName("test"); db.setUserName("postgres"); db.setPassword("123456");
Then everything is perfectly connected and working. But the problem is that I cannot know in advance from which database and from which user this library was called. Is there any way around this? Thank!