Re: DROP COLLATION vs pg_collation question

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: DROP COLLATION vs pg_collation question
Дата
Msg-id ZnGMh-MkQ6aG5tF2@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: DROP COLLATION vs pg_collation question  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Ответы Re: DROP COLLATION vs pg_collation question
Список pgsql-general
Am Tue, Jun 18, 2024 at 03:02:56PM +0200 schrieb Karsten Hilbert:

> I see, and since any database can be used as a template for
> more databases, which can be create with an encoding
> different from the template,

Proving myself wrong:


root@hermes:~/tmp# sudo -u postgres psql -e -f /tmp/db.sql
Output format is wrapped.
drop database if exists new_tmpl;
DROP DATABASE
create database new_tmpl with encoding = 'utf8';
CREATE DATABASE
You are now connected to database "new_tmpl" as user "postgres".
select current_database();
 current_database
------------------
 new_tmpl
(1 row)

drop database if exists new_latin1;
psql:/tmp/db.sql:8: HINWEIS:  Datenbank »new_latin1« existiert nicht, wird übersprungen
DROP DATABASE
create database new_latin1 with template = new_tmpl encoding = 'latin1' locale = 'de_DE@latin1';
psql:/tmp/db.sql:9: FEHLER:  neue Kodierung (LATIN1) ist inkompatibel mit der Kodierung der Template-Datenbank (UTF8)
TIP:  Verwenden Sie die gleiche Kodierung wie die Template-Datenbank oder verwenden Sie template0 als Template.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Monitoring logical replication
Следующее
От: Philipp Faster
Дата:
Сообщение: Re: How to attach partition with primary key