pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Daniel Verite <daniel@manitou-mail.org>
Subject: Re: ICU for global collation
Date: Fri, 21 Jan 2022 21:51:19 +0800
Message-ID: <20220121135119.ywszwl4353v5dzh5@jrouhaud> (raw)
In-Reply-To: <e381e36c-c7a2-2ec0-dbb4-da1dab3f0941@enterprisedb.com>
References: <bba413de-5548-3480-e8f8-1ced562a866b@enterprisedb.com>
	<ed3baa81-7fac-7788-cc12-41e3f7917e34@enterprisedb.com>
	<20220110032508.4eyz6m6mpvt622la@jrouhaud>
	<20220110060027.egvaly4lskylo22f@jrouhaud>
	<c3093547-6ce2-66ca-71de-3a3c633cfb02@enterprisedb.com>
	<20220111110852.t5oxfga57llm5cy2@jrouhaud>
	<a6f807c2-2d11-2cf6-a524-cfbec56e7d5b@enterprisedb.com>
	<20220118040246.dewl5pain2gkv2iv@jrouhaud>
	<171c5f7c-43ee-dbe9-31f9-5e3eb06a54cf@enterprisedb.com>
	<e381e36c-c7a2-2ec0-dbb4-da1dab3f0941@enterprisedb.com>

Hi,

On Fri, Jan 21, 2022 at 10:44:24AM +0100, Peter Eisentraut wrote:
> 
> Here is a second preparation patch: Change collate and ctype fields to type
> text.
> 
> I think this is useful by itself because it allows longer locale names. ICU
> locale names with several options appended can be longer than 63 bytes.
> This case is probably broken right now.  Also, it saves space in the typical
> case, since most locale names are not anywhere near 63 bytes.

I totally agree.

> From 1c46bf3138ad42074971aa3130142236de7e63f7 Mon Sep 17 00:00:00 2001
> From: Peter Eisentraut <peter@eisentraut.org>
> Date: Fri, 21 Jan 2022 10:01:25 +0100
> Subject: [PATCH] Change collate and ctype fields to type text

+			collversionstr = TextDatumGetCString(datum);
+
 			actual_versionstr = get_collation_actual_version(collform->collprovider, collcollate);
 			if (!actual_versionstr)
 			{
@@ -1606,7 +1616,6 @@ pg_newlocale_from_collation(Oid collid)
 						(errmsg("collation \"%s\" has no actual version, but a version was specified",
 								NameStr(collform->collname))));
 			}
-			collversionstr = TextDatumGetCString(collversion);


Is that change intended?  There isn't any usage of the collversionstr before
the possible error when actual_versionstr is missing.

Apart from that the patch looks good to me, all tests pass and no issue with
building the doc either.





view thread (111+ messages)  latest in thread

Message-ID: <20220121135119.ywszwl4353v5dzh5@jrouhaud>
Permalink:  ../20220121135119.ywszwl4353v5dzh5@jrouhaud/
Also on:    postgresql.org/message-id/20220121135119.ywszwl4353v5dzh5@jrouhaud

 · 

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: rjuju123@gmail.com, peter.eisentraut@enterprisedb.com, daniel@manitou-mail.org
  Subject: Re: ICU for global collation
  In-Reply-To: <20220121135119.ywszwl4353v5dzh5@jrouhaud>

* 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