Add pg_strtoupper and pg_strtolower functions

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Add pg_strtoupper and pg_strtolower functions
Date: 2022-05-02 12:51:22
Message-ID: CALj2ACW4k3BHafYZ2RsqOEosY53VwSmCY8aT5Swt7ZDTFpxAHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I came across pg_toupper and pg_tolower functions, converting a single
character, are being used in loops to convert an entire
null-terminated string. The cost of calling these character-based
conversion functions (even though small) can be avoided if we have two
new functions pg_strtoupper and pg_strtolower.

Attaching a patch with these new two functions and their usage in most
of the possible places in the code.

Thoughts?

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-Add-pg_strtoupper-and-pg_strtolower-functions.patch application/octet-stream 6.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2022-05-02 12:56:33 Re: Progress report removal of temp files and temp relation files using ereport_startup_progress
Previous Message Baca Radim 2022-05-02 12:48:27 Item compression in the Gist index