Re: Collation versioning - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Collation versioning
Date
Msg-id 20180918220931.GS4184@tamriel.snowman.net
Whole thread Raw
In response to Re: Collation versioning  (Douglas Doole <dougdoole@gmail.com>)
Responses Re: Collation versioning  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
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.
>
> 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.

Once it gets to an expression and not just a simple check, I'd think
we'd record it in the expression..

Thanks!

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Douglas Doole
Date:
Subject: Re: Collation versioning
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] [PATCH] kNN for SP-GiST