Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2OBb-0002Qu-SS for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Sep 2018 22:09:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2OBa-0005r6-6c for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Sep 2018 22:09:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2OBZ-0005qx-SO for pgsql-hackers@lists.postgresql.org; Tue, 18 Sep 2018 22:09:34 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2OBX-0006Gj-Jc for pgsql-hackers@postgresql.org; Tue, 18 Sep 2018 22:09:32 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 478BD5F79C; Tue, 18 Sep 2018 18:09:31 -0400 (EDT) Date: Tue, 18 Sep 2018 18:09:31 -0400 From: Stephen Frost To: Douglas Doole Cc: Thomas Munro , Peter Eisentraut , Christoph Berg , Pg Hackers Subject: Re: Collation versioning Message-ID: <20180918220931.GS4184@tamriel.snowman.net> References: <4f60612c-a7b5-092d-1532-21ff7a106bd5@2ndquadrant.com> <20180916210215.GE4184@tamriel.snowman.net> <20180918124835.GZ4184@tamriel.snowman.net> <20180918215451.GQ4184@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X4KGi2zgEc2gUaQK" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --X4KGi2zgEc2gUaQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Douglas Doole (dougdoole@gmail.com) wrote: > > The CHECK constraint doesn't need to directly track that information- > > it should have a dependency on the column in the table and that's where > > the information would be recorded about the current collation version. >=20 > Just to have fun throwing odd cases out, how would something like this be > recorded? >=20 > Database default collation: en_US >=20 > CREATE TABLE t (c1 TEXT, c2 TEXT, c3 TEXT, > CHECK (c1 COLLATE "fr_FR" BETWEEN c2 COLLATE "fr_FR" AND c3 COLLATE > "fr_FR")); >=20 > You could even be really warped and apply multiple collations on a single > column in a single constraint. Once it gets to an expression and not just a simple check, I'd think we'd record it in the expression.. Thanks! Stephen --X4KGi2zgEc2gUaQK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJboXeaAAoJEO1sijiDR2RVFc0P/igD/04MB3bWVRRoU/7L3qwR nAgCgAkt9Flr+GY3llVFVBycJNfP3lhf/bO1YIBAKAOtnFKUoHa1g0RY8u1fWuiP mSTghXmwreQRTFpsVlH56CRyv9LTG5vudpaJbCSP8dJhBdgwqikzZDHIpl6W9u2Q CFVbWIxkr5YAppt5sHdSaR7lqYk7h35rsL9gZjMnZe8FkdmAYkQjVBIhBxQXuhgQ g+Bpj/q6fh3kwZT0fM/pRS/WeOlOpx2V+ATNgl9IsM8k09Z3rqiQWa368plWEmxN x72H3x6+iAuRaWGJxAdlhbunKLzPfOD3JfqdfykTrX9gLZk1ChpLQmeU69W9+6oN fL2Gge4yFNlnPvQdHIS8N5SekpZ6Q0HqDJQe7lTt9N6FRQ4q9V5G3fxgTjBKY+Rm IeaS8ML8W3FUJS/XssmY+vt8x0Q5uCUA/X6s3UIgBshLrdKz4roRRWS27EVsdCHp VvypgwySUW8+2Jw0FIL/ck2Goxh/gYmrD/AKVdzsU6CaN7Oj1/ls3yqPuF0H4OK2 FOlGiPBYUkuJw20VisKtj2EEEovYfT3Rgwv1L20aCsaDCsx9Qr1xuabIGzJrayQJ kNDodfq/iWZ4F5epyGr2wUYQyv7KamGAbau8YooH+qVqAYzdbLTzAj01C6tx7fHj 9thrn1t3yQ4KALRy7DmK =y6T6 -----END PGP SIGNATURE----- --X4KGi2zgEc2gUaQK--