Re: cast to domain with default collation issue.

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2022-05-24T05:13:38Z
Lists: pgsql-general
On Monday, May 23, 2022, jian he <jian.universality@gmail.com> wrote:

> CREATE DOMAIN testdomain AS text;
>
>  --asume the default collation is as per show LC_COLLATE;
>
> – on my pc, it is C.UTF-8.
>
> --So the testdomain will be collation "C.UTF-8"
> ------------
>
> => \d collate_test1
>
>             Table "test.collate_test1"
>
>  Column |  Type   | Collation | Nullable | Default
>
> --------+---------+-----------+----------+---------
>
>  a      | integer |           |          |
>
>  b      | text    | en-x-icu  | not null |
>
> -----------------------------------------------
>
> My guess is that the following should be the same.
>
>
>
My reading of the docs say this is consistent with outcome #2.

https://www.postgresql.org/docs/current/collation.html

 David J.

Commits

  1. Doc: clarify the default collation behavior of domains.