postgres=# DROP DATABASE template_postgis;
ERROR: cannot drop a template database
http://www.postgresql.org/docs/9.1/static/manage-ag-templatedbs.html mi sembra che se io imposti template_postgis.datistemplate = false
, sarò in grado di rilasciarlo, ma non so come impostarlo.Come si elimina un database di template da PostgreSQL?
ho guardato nello script che ho usato che ha creato il modello. C'era la riga 'psql -d postgres -c" UPDATE pg_database SET datistemplate = 'true' WHERE datname = 'template_postgis'; "'. – dbkaplun
Ciò causa ulteriori problemi. Ho fatto un aggiornamento da 9.1 a 9.2 su ubuntu. Questo ha creato template1 implicitamente. Ho quindi eseguito il comando e sembra funzionare. Tuttavia, ora ho installato phpPgAdmin e non riesco ad accedere, dice: 'FATAL: database "template1" inesistente' – hek2mgl
Per ricreare template1: 'creare modello template1 template1 database;' 'UPDATE pg_database SET datistemplate = 'true 'WHERE datname =' template1 '; ' Vedere anche: http://pgsql.inb4.se/2009/april/rebuild-template1.html –