pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Douglas Doole <dougdoole@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Collation versioning
Date: Tue, 18 Sep 2018 18:09:31 -0400
Message-ID: <20180918220931.GS4184@tamriel.snowman.net> (raw)
In-Reply-To: <CADE5jYL9MRNTRacvCAcPo9bpBo095ReGC1CSYHy-qmuPisX2iw@mail.gmail.com>
References: <4f60612c-a7b5-092d-1532-21ff7a106bd5@2ndquadrant.com>
	<CAEepm=33gHF92UD8bkoZzzbs+GkVhHFzgV4CPf8ZxFRqZ_UCHQ@mail.gmail.com>
	<CADE5jYKn6FA0a35P+_HJuSb_abq-D5Z-nE6rO9brjpu8jBTMgA@mail.gmail.com>
	<CAEepm=3-rxTzk3anR1QA=tuNrbAQ_ejJ2rj5Hp_y5hdJQr=rEw@mail.gmail.com>
	<20180916210215.GE4184@tamriel.snowman.net>
	<CAEepm=1wPRi4-YZaSvLXhpzO-6BEyPjBz0qBGpuQ-nmYKAhuvQ@mail.gmail.com>
	<20180918124835.GZ4184@tamriel.snowman.net>
	<CAEepm=1XCyNbhEaU+1tG_dFDVje=q98dg2uQJoJPWMu6HEjW2g@mail.gmail.com>
	<20180918215451.GQ4184@tamriel.snowman.net>
	<CADE5jYL9MRNTRacvCAcPo9bpBo095ReGC1CSYHy-qmuPisX2iw@mail.gmail.com>

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

Attachments:

  [application/pgp-signature] signature.asc (818B, ../20180918220931.GS4184@tamriel.snowman.net/2-signature.asc)
  download

view thread (188+ messages)  latest in thread

Message-ID: <20180918220931.GS4184@tamriel.snowman.net>
Permalink:  ../20180918220931.GS4184@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20180918220931.GS4184@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: sfrost@snowman.net, dougdoole@gmail.com, thomas.munro@enterprisedb.com, peter.eisentraut@2ndquadrant.com, myon@debian.org
  Subject: Re: Collation versioning
  In-Reply-To: <20180918220931.GS4184@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox