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 1sIDE9-00DvoW-9Q for pgsql-general@arkaria.postgresql.org; Fri, 14 Jun 2024 20:08:49 +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 1sIDD8-005RO1-St for pgsql-general@arkaria.postgresql.org; Fri, 14 Jun 2024 20:07:47 +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 1sIDD8-005RNs-GH for pgsql-general@lists.postgresql.org; Fri, 14 Jun 2024 20:07:47 +0000 Received: from mout.gmx.net ([212.227.15.15]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sIDD6-001gI8-Mz for pgsql-general@lists.postgresql.org; Fri, 14 Jun 2024 20:07:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1718395662; x=1719000462; i=karsten.hilbert@gmx.net; bh=nMdOqzavtOAf9y0z29D9fuOWOsXwwMIVoOk/6iKXsrA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=j8SQ0M/M8WKFPzHwB4jnK8yRgDpI5rGz+/KLA7wfC0OBdzaumgdlr2HTEHMOtPEx d4EhBQ1UZppyz7bQ7iVGoMpFjXDEtfzY4e9d4JdDvfzneW0GSMG8BiL0iRCDBcXyL WhbMsvtydKcHHrMEOcO2zjS84rWbOJcBc7XSK1gjpzRiM+O/HvOhQGlZPhvLcZHm0 eYNvMaGezsN2Ao3bJojXWklVsQMHblleJX8xrSRpk/Ax0Ax6oy1o4b8aIjmZHHjhQ ZsmZyxPI4Mb+uS7hN8HUiUfebZkyzJk8xbxENcVAuWIEv7uqlvKpWYrLAd6UKTFzL 3oc/HhDMWuBAXQ36VA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from hermes ([79.192.55.172]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mq2j2-1snP6i2fo2-00nbwZ; Fri, 14 Jun 2024 22:07:42 +0200 Received: from ncq by hermes with local (Exim 4.96) (envelope-from ) id 1sIDDQ-0006yj-3C; Fri, 14 Jun 2024 22:08:04 +0200 Date: Fri, 14 Jun 2024 22:08:04 +0200 From: Karsten Hilbert To: Laurenz Albe Cc: pgsql-general@lists.postgresql.org Subject: Re: DROP COLLATION vs pg_collation question Message-ID: References: <26f717988471c4d672cce8c495a2c8e68446486a.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26f717988471c4d672cce8c495a2c8e68446486a.camel@cybertec.at> 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:FPQOsoMkv0CHIANarfx21FdQ2KClJX1RaMP7PIj+HLOqaK3KcJn WcFMGDVzKoEI3DCj+Pqe6o/0Y8cQcAQVGXh9jJfnyJ9fL0+3WpVLIM0erjrVVc/gGqS2WZ7 JsZVXu5ejFzwCDe7GR39/lAqbf4+ynMhP5NwCrJHnp3N4QI7rjAIig0u08bUV6ko42y1Jsu bsVpB+rEqSxTiNkYrBG1Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:C+ZilQWF1hQ=;Ai4IPPep/e/bahYvH1V9si+6oAx IZFG9BLf4WhFH2e9fXrysCL1xB9fkmXVMDtWHGTe5zTnoARPP6DU59eTvEgK8qEmxlJdzD9O+ lk5N3ptiK9TroRR3FXsdXYX3SjK1ovu6zKI7E6fG2RaDBCjyjOfobfnQ3fZgOfKEPBGnnYEN0 grlo07vCuO39gtnLNTnBAYjqoE1Nt4xw76f632nt2jED/WDH3WYvP0REYg35hR1pCOGj42yPU duf5B4K5utBYvkWXJ8ESdEdpPv4bfUoi2birfb0JUm53R6XxGddoxPK10t9kLzKMWljF91JSL UIhs7NP079nVz3KvOOzutzkifVW35C0rIffoVtaIwxEnv2x7ZGQjiQw6S/RPZkcTryrs/vkFr YsEcJ955BEXuIRcGDREb9IdN4Sdt25TCHfLqmPXhLOYSgybUj+TEzc6bC3JtbiBXdgluW2GYx YGM2EQPOaBeWLXE9stfT6SK/wUSz3OOoPD5reKhXm1FDwnXcJz8c5p8CqtcAFTe99KyNIbfXx Xb0xpUtjpdaofdzUFW9iwIMpifAH/6bB/H1tX88MJZM9Ul2ObUAt2JSzRnM0nHklxSkw64eeS /6GV0O5GEM3OU760BZgwynIHavQP4ZstYBlvrVDWVLuAkTN7Y08g8/jWPHQf6wSbsRSv/JAyf PZYAXEq7OAjnySJk7eHnQZ8paQIxndEVlsLqmy4b9hJNRc5NV/hC1cdKZPsJxJLnZ9oiFWrV9 lIyFw4NNFHhEwNIooEdX87YMUB0PuVYIPlzM6PyCFNiUXq0KUcCPGVQVKc5J78oHIQxUjIkWD U7SEbImH85bdqXc3loluBRK2FSTJq7J9cKYqpOZdg1rIE= Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am Thu, Jun 13, 2024 at 09:49:46AM +0200 schrieb Laurenz Albe: > > > Note that with DROP COLLATION you can only remove collations > > > that belong to the encoding of your current database. > > src/backend/catalog/namespace.c: > > /* > * get_collation_oid - find a collation by possibly qualified name > * > * Note that this will only find collations that work with the current > * database's encoding. > */ > Oid > get_collation_oid(List *collname, bool missing_ok) Thanks. Are collations per-database or per-cluster objects ? I am asking because I seem to not be enabled to 1) use a collation that's intended for an encoding different from the database encoding -> makes sense 2) remove a collation that's intended for an encoding different from the database encoding -> so far so good, ignore them, but 3) update collation version information in pg_collations for collations intended for an encoding different from the database encoding (ALTER COLLATION ... REFRESH VERSION fails) which in effect would mean that -- upon change of collation versions in the underlying operating system (ICU update, libc update) -- one would have to live with outdated version information in pg_collations short of dump/sed/restore or some such ? I'm pretty sure I am overlooking something. Best, Karsten =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B