On 15.08.2018 17:19, Dimitry Sibiryakov wrote:
15.08.2018 16:13, Alex Peshkoff via Firebird-devel wrote:
In the simplest form (create database on current server) that will look like this:
execute statement 'create database ''/tmp/t1''';

  What about security and other settings? Will newly created database use default ones or somehow inherit them from current?


Taking into an account that this is suggested for FB4 (not 2.5) I do not see problems with security. Only restricted list of users can create new databases. And I will require connected user to have right to create database, things like SQL SECURITY DEFINER / WITH CALLER PRIVILEGES will not be in effect.

The only parameter that must be inherited from current database is SQL dialect - we just have no way to place it into CrDb statement (certainly, we can expand syntax if required but that is out of scope of this particular improvement). All the (page size, character set, etc.) may be set using SQL syntax and I was going to make people use it, not inherit something else from current DB - but certainly this can be designed in other way.

Even with mentioned restrictions feature should sooner of all be useful - with it one can create databases from SP w/o need to use something like special UDF/UDR for it.

  What's may be a purpose of database creation on-the-fly?

That's sooner of all shold be called not purpose but missing features - tablespaces and partitioning. When performance gets critical and need in at least manual partitioning becomes very big people want to be able to perform all needed operations from fixed set of SP, not delegate part of that tasks to the (for example) client.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to