Am 29.04.19 um 09:59 schrieb bareos-user:
> My question was not whether I could change something in the database —
> it seems to me that you misunderstood my question :)
> My question is this: is it possible to use the SQL rc script at the
> stage after the director connects the database, but before he actually
> starts using it? This probably applies to both SQLite and PostgreSQL
> (but not sure about the latter). The analogy of what I ask is ~/.bashrc
> in the case of the shell: the shell, before giving the session to the
> user, reads the script and makes the settings for the session. So in my
> question: custom settings for working with the database, something else
> in the form of an SQL rc-script.
I see.
Right now this can only be done in the C++ sources and will require a
recompile. If you want to do this, it is in core/src/cats/dbi.cc in
BareosDbDBI::OpenDatabase() at the end inside switch(db_type_) you can
add a new "case SQL_TYPE_SQLITE3" issuing SqlQueryWithoutHandler() calls
as is done for SQL_TYPE_MYSQL and SQL_TYPE_POSTGRESQL.

If these changes are generic (i.e. will help any sqlite db out there),
you can also open a pull request on gitgub or send the patch to the
bareos-devel mailing list.
More info on that is in the developer guide's contribution section[1].
The same guide also describes how to build Bareos.

Best Regards,
Andreas

[1] https://docs.bareos.org/DeveloperGuide/generaldevel.html#contributions

-- 
  Andreas Rogge                             [email protected]
  Bareos GmbH & Co. KG                      Phone: +49 221-630693-86
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to