Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCdXn-0004yg-HC for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Feb 2021 07:16:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCdXm-0002pD-87 for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Feb 2021 07:16:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCdXl-0002p4-1E for pgsql-hackers@lists.postgresql.org; Thu, 18 Feb 2021 07:16:09 +0000 Received: from [64.147.123.19] (helo=wout3-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCdXf-00051x-2b for pgsql-hackers@postgresql.org; Thu, 18 Feb 2021 07:16:07 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 628AFA92; Thu, 18 Feb 2021 02:15:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 18 Feb 2021 02:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=/r12axirVXFsxldk1X5KS1LQWGp EOItpKgeD1GL3gpg=; b=EO2db+nNnMIVU+eACjCvqzfRxkdvJ0hUj2oCFwKG4Tw 5SJzb7o3h4EB7w/w+tZIv+oEwp9fFmkdcQtY2wUh+0YyJr8Twqf8EV081O8zMwNz bphjN3S2BUvfIknP2LmUx6f8v2NfOovrx4fmKoA4j9UQOPFAJ0aViL/aiKSadM7u Y+DLYEAys0UotJdpDSjC4E93oEr37pd/EbQZOAxJ8RpnjC3g26hu62RcMvOLCRR1 BnwI2bMzEje8NkDIL3f3UX2QDmbdGRVJ4HXWLNoeIMvq4wEVIbU68fYZ49be2wHv PvVVE/PirvViFtg7ia4EsV0tdYewtXrkzinrsOmsPZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/r12ax irVXFsxldk1X5KS1LQWGpEOItpKgeD1GL3gpg=; b=PDEjWl8cikuL1SGV9wjH+9 8zYcCwtZSk6rvjOOdGEb0eTeDy8ZS6oRkUvajdX3Ic3Lvm9CgsB1GJW+oIhAmj6c vP7FUJAv0hDnjGOgu+XrKhdpS+qJ7WzNxfKuIYshiJ3X8Cq7QP72d8qsM4w/Dcuo KWpkMoZgO2Ty+g/r2tlZtYQfMhKX2BC17NrCpl60mEFD5Jimm5M8JDSYVxJtGhm1 nqA/tP3Dy3CGCtd7mUlaczNpvi1i0rP+fefkgqcLGxVUIgubwaPzlma1GLszctv4 +LGGkuSqdw0WR0NK/AsWiqQzINtoln7j/UF2Xd206nOLMUnGmxqQKuf10NxoyJIg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeefgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C47D1080057; Thu, 18 Feb 2021 02:15:49 -0500 (EST) Date: Thu, 18 Feb 2021 16:15:44 +0900 From: Michael Paquier To: Thomas Munro Cc: Justin Pryzby , pgsql-hackers Subject: Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123 Message-ID: References: <20210117215940.GE8560@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fKJVcdx+5T+ekwvV" Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.19 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --fKJVcdx+5T+ekwvV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 18, 2021 at 10:45:53AM +1300, Thomas Munro wrote: > I guess I was trying to preserve a distinction between "unknown OID" > and "this is a collation OID, but I don't have version information for > it" (for example, "C.utf8"). But it hardly matters, and your > suggestion works for me. Thanks for looking! Could you just add a test with pg_collation_current_version(0)? + pg_strncasecmp("POSIX.", collcollate, 6) != 0) I didn't know that "POSIX." was possible. While on it, I guess that you could add tab completion support for CREATE COLLATION foo FROM. And shouldn't CREATE COLLATION complete with the list of existing collation? -- Michael --fKJVcdx+5T+ekwvV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmAuFCAACgkQnvQgOdby QH1nXQ/+KwMJjhKI82lc2eJepoOevO6i9SfUB4YBRCpzeu4PZaESvflj/+SnEIYl vB70r+M16Kgv/dt5u9zoUEOkwxHA2YoQjj6wAPBb1TfSJqEowifEviZiEdQ0d/oN spfNCgeo1Xj/fCKukCIM09QQUi52UhVVLuM5nhDSDYvdcYakPp/aZcV4ByiDPrxM /C+uIePsV6EVDkwjRL32OcqLfA0R7VCi99DRFkmk7tSfj0/+vpG5pFZxYTlnghEe Ni5/pKuGaG1YacskvU5CLOQ2sWgDGHALu21nB/0/jT3UsKLU3VFJTtK4Iuz2Uo7Z MgzD4n0E8llz0XNo4qjYKnWdFt8XlGXZmVGilkjA87raW6KmJAO5m3plNBCJPFqP 29Ujd5IwgO8m4U1PWpQUtBHA9O3pkhK1itzus5+cJYkYSibSlBVDQcgODnAiswor QYXOb9QNN8uuKqtNMelGbhqge7n3ybAHRHvJlSW4YbnAO5CrdaBsjFdslLMzXU0e +hSN0YJXTXBSHH4Xp1sDc3Ki8SX6NALdBbObnAh8cppPUag7VoB7ZjKdTQ9cILaE SNRMuEEmhlARr8w6rjvBfD012sPwiuxHjvv4JoL7RyLXv1HqHgtHwgBSspYc6qkm XEBiSx4QkP2K3L/HjQzii24MR06lz8qum1sMDkTAKwhS/CCZz0A= =7wid -----END PGP SIGNATURE----- --fKJVcdx+5T+ekwvV--