Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAcRP-007Qf1-6p for pgsql-sql@arkaria.postgresql.org; Tue, 05 Dec 2023 20:54:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rAcRN-0062Na-NW for pgsql-sql@arkaria.postgresql.org; Tue, 05 Dec 2023 20:54:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rAcRN-0062NS-E3 for pgsql-sql@lists.postgresql.org; Tue, 05 Dec 2023 20:54:49 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rAcRL-00AHMB-3L for pgsql-sql@lists.postgresql.org; Tue, 05 Dec 2023 20:54:48 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50bfe99b6edso2532418e87.1 for ; Tue, 05 Dec 2023 12:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701809685; x=1702414485; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NmGk7Wn3N60Ba3PDiDP1Pq+5jI1US33G/nSC2RftB08=; b=KqNpX06OZxmjG8WmdVV3OjRYqlCVkmpCJYkecKcb/fEM3VerXr7OtLI8btSyBXNzT5 Z4RjRv1th7zTrq5Vtg6hK1QxLqimoskuu2X289GHtMN5BAhWEhK//z8D8qFiywPMGkcn 5NXOBsE0CDeLe9KUFQVl9rMYT/Vtci2059+EvPhf6h0Z21EUD4ilNjF5+lzvsYNwB/bn pKS/M/S8x6eovDuLkcjYvGcJ4/aqx7awEn5ZvdHC/rWaHXT1Bg/diykh52Kf5IiFy7qo gyEiZI3ctnRcXpKt3zZBfVKP4rpnFValKpBKooR3CP6RbYzJs+8VjYE/+RQNOxGh9Q5C l3FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701809685; x=1702414485; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NmGk7Wn3N60Ba3PDiDP1Pq+5jI1US33G/nSC2RftB08=; b=sPFMQlAexLBPiW/lsToDkTnqF+RKSR+Y+0nPAzZUnYzVUP+eKKAAHUOIxIpXcqClRi s3ZJT4yf2MMcO84rNn6UinocpJEgqGH11/WxmbcwM/zobmjDbwk+oIw4f8blcUL/O9xt SYwturDs17mD0eIAHzhhOvavDmFnPnXCsmoYZiK/E4ZNL2FJUaF6h9x1KO1zFMSfJJEo x1ARXZduPf9YN+vx+Ol0Evnnb6vqPn2z3v5dls79ZfrdL0rTnv7Ub1t+A/M2Whd2ohjJ daByMi1dHloZNWBGfppl8wtMdlnGWin0Dq3+RC6wPcwLm14D2qczozxhnhCStKjKOJnR UNhw== X-Gm-Message-State: AOJu0Yy65u+to+ms4q7F4Hd8O/jGcX6YemuPpmqbyJVg9SUhCFz4RiCK fPS4pXObA0b5QIsJNKPoK5VCwrBIWgEq1Nb++jFbFfV2Rmw= X-Google-Smtp-Source: AGHT+IHPi3UG5CldMkVFAaP6Ukz6yr3ADpjwa31ulTwVn4P9Nbl3tCvikEo2d6kdRkAnQxGNtZO+gfrs3eQmhbN4p9A= X-Received: by 2002:a05:6512:3a9:b0:50b:f07f:5308 with SMTP id v9-20020a05651203a900b0050bf07f5308mr2118968lfp.122.1701809685116; Tue, 05 Dec 2023 12:54:45 -0800 (PST) MIME-Version: 1.0 References: <848536.1701750235@sss.pgh.pa.us> In-Reply-To: <848536.1701750235@sss.pgh.pa.us> From: Greg Sabino Mullane Date: Tue, 5 Dec 2023 15:54:08 -0500 Message-ID: Subject: Re: Overcoming Initcap Function limitations? To: Tom Lane Cc: Steve Midgley , Bo Guo , pgsql-sql Content-Type: multipart/alternative; boundary="000000000000c1bd25060bc971ca" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c1bd25060bc971ca Content-Type: text/plain; charset="UTF-8" I agree with Tom. Store the original: let the frontend uppercase themselves if they want it that way. If they decide to force the transforms back down to you, you won't have spoiled your input. If they are querying on that column, a functional index on lower(col) would be nice. To answer your original question, yes, let the front end deal with the problem, leaving you time to worry about more traditional database-related problems. :) Cheers, Greg --000000000000c1bd25060bc971ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I agree with Tom. Store the original: let the fronten= d uppercase themselves if they want it that way. If they decide to force th= e transforms back down to you, you won't have spoiled your input. If th= ey are querying on that column, a functional index on lower(col) would be n= ice. To answer your original question, yes, let the front end deal with the= problem, leaving you time to worry about more traditional database-related= problems. :)

Cheers,
Greg
--000000000000c1bd25060bc971ca--