User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Multiple users request possibility to execute some SQL statements/script (such as setting query/session timeout, setting time zone, changing schema, etc.) directly after making a connection by a user. This should be done each time a user connects to the MonetDB server and independent of the used client program.
So be part of the user definition as stored in the server.
Proposed SQL could be: ALTER USER <username> SET logon_cmd = '<the SQL commands>';
For this the system table db_user_info needs to be extended wit an extra column: logon_cmd string;
Initially when the user is created it will be NULL.
It can be set (only by sys admin) via: ALTER USER <username> SET logon_cmd = '<SQL commands>';
It can be unset/cleared via ALTER USER <username> SET logon_cmd = NULL;
It should also allow to specify a set of SQL commands (separated by ;) such as:
ALTER USER "test_user" SET logon_cmd = 'call sys.settimeout(20); call sys.setsession(100); set time zone local;';
Optionally it should also allow to call a user defined stored procedure, such that more complex scripts could be defined in one stored procedure. This allows definition and testing of the script/procedure to be independent of the logon cmd and ease the setting of the same logon_cmd for multiple users.