B
B
BonBon Slick2018-05-18 12:37:59
PostgreSQL
BonBon Slick, 2018-05-18 12:37:59

Is the custom function in the database template duplicated in the new database?

Create a new function calculate(0 in database schema A, then create database B, is the function duplicated or is it only available within the 1st database?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-05-18
@BonBonSlick

It depends on how exactly you create base B. Namely, what exactly will be specified in the template parameter.
If template points to the database where you created the storage, then this database will be completely cloned, including storages.
If the template points to where this storage is not, then it will not be in the created database.
The default base is template1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question