From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: jian he <jian.universality@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: cast to domain with default collation issue.
Date: Tue, 24 May 2022 10:42:38 -0400
Message-ID: <1543933.1653403358@sss.pgh.pa.us> (raw)
In-Reply-To: <1432728.1653370431@sss.pgh.pa.us>
References: <CACJufxHMR8_4WooDPjjvEdaxB2hQ5a49qthci8fpKP0MKemVRQ@mail.gmail.com>
<CAKFQuwZB8iWL9btLWEr-Zo8tUMbCpKstEBP3gSQjVk6uCWbZKQ@mail.gmail.com>
<1432728.1653370431@sss.pgh.pa.us>
I wrote:
> Perhaps this should be documented more clearly, but it's not obviously
> wrong. If the domain declaration doesn't include an explicit COLLATE
> then casting to the domain doesn't create an explicit collation
> requirement. (That is, the domain *doesn't* have a specific
> collation attached to it, any more than type text does.)
Perhaps we could improve matters like this?
inline patch 1: doc/src/sgml/ref/create_domain.sgml (+2/-1 lines) download inline-1.patchdiff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgmlindex 81a8924926..e4b856d630 100644--- a/doc/src/sgml/ref/create_domain.sgml+++ b/doc/src/sgml/ref/create_domain.sgml@@ -94,7 +94,8 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea
<listitem>
<para>
An optional collation for the domain. If no collation is
- specified, the underlying data type's default collation is used.+ specified, the domain has the same collation behavior as its+ underlying data type.
The underlying type must be collatable if <literal>COLLATE</literal>
is specified.
</para>
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, jian.universality@gmail.com
Subject: Re: cast to domain with default collation issue.
In-Reply-To: <1543933.1653403358@sss.pgh.pa.us>
References: <CACJufxHMR8_4WooDPjjvEdaxB2hQ5a49qthci8fpKP0MKemVRQ@mail.gmail.com> <CAKFQuwZB8iWL9btLWEr-Zo8tUMbCpKstEBP3gSQjVk6uCWbZKQ@mail.gmail.com> <1432728.1653370431@sss.pgh.pa.us> <1543933.1653403358@sss.pgh.pa.us>
* 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