pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Alexander Borisov <lex.borisov@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Optimization for lower(), upper(), casefold() functions.
Date: Tue, 18 Mar 2025 13:49:00 -0400
Message-ID: <109244.1742320140@sss.pgh.pa.us> (raw)
In-Reply-To: <deca9cd8a3a84be794706ca8f38646ac6d757f0d.camel@j-davis.com>
References: <7cac7e66-9a3b-4e3f-a997-42aa0c401f80@gmail.com>
	<e7abe9be-1f1a-4fed-9cc3-35be257bab34@gmail.com>
	<7ab9d255-d7c0-4841-96c3-ed3ce9aa4abd@iki.fi>
	<12956299-1496-4455-b3ab-299cc0a87d7c@gmail.com>
	<340f2451-cd76-487b-a1e4-0f0a2fe91fba@gmail.com>
	<3ffb8b75b26e76624668c0883cac7886468c5d07.camel@j-davis.com>
	<5cf176fa-44b9-4019-b9b7-ee902352a844@gmail.com>
	<3080de9bcce916cf8720ac197f634e381c4de564.camel@j-davis.com>
	<1e3f4f6f-9b12-4109-b0d2-a4c52b5064f8@gmail.com>
	<d0dd50662da84f582c34247f4ed43061e8d86d34.camel@j-davis.com>
	<e9057c71-93ec-4a21-b02e-979c7da2b665@gmail.com>
	<f1d9edd497cc799720cdb49c50cd0067460a5443.camel@j-davis.com>
	<cc097475-8fc5-4d3a-8044-8438126933b2@gmail.com>
	<4f3772355e038acd3cfe0be43ae2c1aacae1794d.camel@j-davis.com>
	<be117144-0d26-4763-ae97-f12e87ee2741@gmail.com>
	<2c10910c21b16cb9a0e5f67d80589e3acae2b6ef.camel@j-davis.com>
	<44005c3d-88f4-4a26-981f-fd82dfa8e313@gmail.com>
	<2a9e520ba41b318df8ed396ef99ed1e3d3e4b5b6.camel@j-davis.com>
	<177451ea791a1! ! f90039ea3047f1f890b1f9ae1db.camel@j-davis.com>
	<3505356.1742069486@sss.pgh.pa.us>
	<CAMp0ubc=7Nce6RvXPfjy0jKTd8KBq0BDnhxOLOPLQpHynyo+qg@mail.gmail.com>
	<93731.1742310701@sss.pgh.pa.us>
	<deca9cd8a3a84be794706ca8f38646ac6d757f0d.camel@j-davis.com>

Jeff Davis <pgsql@j-davis.com> writes:
> On Tue, 2025-03-18 at 11:11 -0400, Tom Lane wrote:
>> Also, probably better to make it const:
>> 
>> -static const pg_wchar *casekind_map[NCaseKind] =
>> +static const pg_wchar * const casekind_map[NCaseKind] =

> Was this a general suggestion, or did you see something in particular
> that would make it more optimizable this way?

No, just a general style position that tables that aren't supposed
to change should be const.  Cases like this are a tad insidious
because it looks like you did make the table const, only you didn't.

			regards, tom lane





view thread (33+ messages)

Message-ID: <109244.1742320140@sss.pgh.pa.us>
Permalink:  ../109244.1742320140@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/109244.1742320140@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pgsql@j-davis.com, lex.borisov@gmail.com, hlinnaka@iki.fi
  Subject: Re: Optimization for lower(), upper(), casefold() functions.
  In-Reply-To: <109244.1742320140@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