Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJYxM-005ZzW-22 for pgsql-general@arkaria.postgresql.org; Tue, 18 Jun 2024 13:33:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sJYxJ-00DDct-Dk for pgsql-general@arkaria.postgresql.org; Tue, 18 Jun 2024 13:33:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJYxI-00DDcW-W3 for pgsql-general@lists.postgresql.org; Tue, 18 Jun 2024 13:33:01 +0000 Received: from mout.gmx.net ([212.227.17.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJYxH-002I23-O4 for pgsql-general@lists.postgresql.org; Tue, 18 Jun 2024 13:33:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1718717576; x=1719322376; i=karsten.hilbert@gmx.net; bh=w0Xbzt4O/YBKGgPaQgbH4DSkao0KDDyXagBcS7WgL/E=; h=X-UI-Sender-Class:Date:From:To:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=EOd9qQaTJ9YysK1EOUu/xeZOU2iIET1cz5LxPiwf+9Y0UPzczXH9Kf581OOdXEqD YdJ3E9oY2bffEuGDPqMKsUwRKcpXhO58MZ8wzhMQG8iyLAhx9CM/q0r9VXC3q1tJU ibueR6h1URqyfApOS9dTRJvVZiB5c70/EEuvmdwkPsMCLMqFfTYJk8+vtHg3n1+Eb GSmW8nuwiC9u9K9ENoLNOxKIpulr1CwltJABnn+XpCn52X9VWOM6zPvRYGrke4kMR ZIYFMz6ifaD41adCS5oY6fyBnDRSEBEZL4QAomeIFkvYgPuoIa5RWapRbP09Eat8p 4t0Qsj8/JD944I+/ow== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from hermes ([84.144.215.28]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MaJ81-1rphuf0HHJ-00YruJ for ; Tue, 18 Jun 2024 15:32:56 +0200 Received: from ncq by hermes with local (Exim 4.96) (envelope-from ) id 1sJYxD-0003FT-19 for pgsql-general@lists.postgresql.org; Tue, 18 Jun 2024 15:32:55 +0200 Date: Tue, 18 Jun 2024 15:32:55 +0200 From: Karsten Hilbert To: pgsql-general@lists.postgresql.org Subject: Re: DROP COLLATION vs pg_collation question Message-ID: References: <26f717988471c4d672cce8c495a2c8e68446486a.camel@cybertec.at> <56da532b44bc02a7648796041ffa5da0a85c06df.camel@cybertec.at> <740fb9086af71f864ddb526cad1e55888385bedd.camel@cybertec.at> <3031360.1718570329@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) Sender: X-Provags-ID: V03:K1:35JCccMDBWzwRscEzEVZb1vrm9WsZlAoAF2G9FFxxkAdeDvYb5u mtE6CJRBeESLt11yS7/ake5eKRe+kXvLEiEapPP+L5cVSXuu5yzCeGLa1rKFx33jWGwkKjD x24jeMErBaFdE3TQSeZ7cxhrpKNbHHBbUmevhQTpfFRVc7X8vkWiNw4dKENj9Ou0z/7pFXf GsTCzVNJ8jqYYUD1RnGYQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:zXeH9gzDJnw=;2Wqd3iWdtWX8mKheLlqWO5WEXzH PpCfWcAWPREoRBT5RJmyIIBA7qEWrGTtyuw+kMdE3E0Vte9l/0N1Hj6fcL+D6vUND0xMzdy72 qIx//SZ5WlMia42iuw16uoL6vAtfSD5/P46t8dSummLbn2PuUYnw2IMvA8+etm9A9fuK4Z42j pdXy5WOLCtZphWOwi2sJkIzbXearZTCAuI1LN8LlOUb+6jU92QOpT/X+qZNHJ0FJSk2ZxY5Wb sFIYJXnvoCGC1xZ+Ogiy8vFATlYifeGuHgbgwmbgo6iqPfTy+MlVOV8hJxBJWUotmF3DJ+x55 JqPHkT1O2Bx3rATSP6T6DvC2/ESGcVsavv/r4269lCLnl2zwEjx99R8H7qdABxtsa3MZigpZR 56tfioRJdKlpKCpeJFDIX+1SQpYfqtw4aFaAItaROmFZap1pH9MM5DVLV38W1VTrI3RjG8kSt AZb3Xw9LorHtOEFCtVjGGzjGPqBpN8ZUa7DSd7L4FHpc5BYqm2dRm1IhvdtxIQng500wIsxMU 1S4GNmXXaj2DadvhL5feW4+XdLCVAXqDESSlsdyqHjwGcFAm9X+mMoW7KW+L/gNBauxymJlNX TTDmpF5bTrYNEg5m+anj2dVql8Kd+z3kqVJF7A2PRV86Do3oJcyjUKjV+Vh3vkRbjUA/tHhyH CwaEIbSZSLpPwR1JcLp2xv7rQp6k+zYIoS8AqwmMhlf7zhWUyHYBQyiwZZgQ/RYbS2F6Wat84 BdRjBaCjcPm3fJSeWu61O2hxXebU33U9tCnHZZagtD43i8mwV7MNV62z6inipOGnmLO+61ESn 0m04PoqCQsLxoZV/n50tzG3UZVcHDwX9G/Ncbl3b8lzLc= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 =3D 'utf8'; CREATE DATABASE You are now connected to database "new_tmpl" as user "postgres". select current_database(); current_database =2D----------------- new_tmpl (1 row) drop database if exists new_latin1; psql:/tmp/db.sql:8: HINWEIS: Datenbank =BBnew_latin1=AB existiert nicht, = wird =FCbersprungen DROP DATABASE create database new_latin1 with template =3D new_tmpl encoding =3D 'latin1= ' locale =3D '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 =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B