Re: Collation versioning

From: Douglas Doole <dougdoole(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation versioning
Date: 2018-09-18 22:05:51
Message-ID: CADE5jYL9MRNTRacvCAcPo9bpBo095ReGC1CSYHy-qmuPisX2iw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> 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.
>

Just to have fun throwing odd cases out, how would something like this be
recorded?

Database default collation: en_US

CREATE TABLE t (c1 TEXT, c2 TEXT, c3 TEXT,
CHECK (c1 COLLATE "fr_FR" BETWEEN c2 COLLATE "fr_FR" AND c3 COLLATE
"fr_FR"));

You could even be really warped and apply multiple collations on a single
column in a single constraint.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-09-18 22:09:31 Re: Collation versioning
Previous Message Stephen Frost 2018-09-18 21:54:51 Re: Collation versioning