Re: looking for doc

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: looking for doc
Дата
Msg-id CAB8KJ=jGhK94AoBrurG71jmFXeuDt+_Bru25FO0jUoV9YgzqqA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: looking for doc  (Kasia Tuszynska <ktuszynska@esri.com>)
Список pgsql-admin
2014-03-18 6:54 GMT+09:00 Kasia Tuszynska <ktuszynska@esri.com>:
> Ian,
> Thanks that is the really only doc that comes up when I search for this. It discusses how to call a template to
createa new db, but it does not list the differences between them. I am going to try to just find a definition of both. 

Basically, "template1" is the default template used for creating new databases.
Normally template1 and template0 are identical, however it's possible
to customise
template1 if there are some modifications you wish to  have automatically in
all new databases:

    template1=# CREATE LANGUAGE plperlu;
    CREATE LANGUAGE
    Time: 1033.037 ms
    template1=# CREATE DATABASE foo;
    CREATE DATABASE
    Time: 3267.212 ms
    template1=# \c foo
    You are now connected to database "foo" as user "barwick".
    foo=# \dL
                         List of languages
      Name   |  Owner  | Trusted |         Description
    ---------+---------+---------+------------------------------
     plperlu | barwick | f       |
     plpgsql | barwick | t       | PL/pgSQL procedural language
    (2 rows)


template0 cannot be changed and serves as a "backup" if you need
to restore template1, or create a new database without the customisations
in template1.

Regards

Ian Barwick


В списке pgsql-admin по дате отправления:

Предыдущее
От: Kasia Tuszynska
Дата:
Сообщение: Re: looking for doc
Следующее
От: David Johnston
Дата:
Сообщение: Re: looking for doc