Re: Add pg_strtoupper and pg_strtolower functions

2022-05-04 Thread Tom Lane
Alvaro Herrera writes: > Currently, pg_toupper/pg_tolower are used in very limited situations. > Are they really always safe enough to run in arbitrary situations, > enough to create this new layer on top of them? They are not, and we should absolutely not be encouraging additional uses of them.

Re: Add pg_strtoupper and pg_strtolower functions

2022-05-04 Thread Alvaro Herrera
On 2022-May-02, Bharath Rupireddy wrote: > 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

Re: Add pg_strtoupper and pg_strtolower functions

2022-05-04 Thread Bharath Rupireddy
On Mon, May 2, 2022 at 6:43 PM Ashutosh Bapat wrote: > > On Mon, May 2, 2022 at 6:21 PM Bharath Rupireddy > wrote: > > > > 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

Re: Add pg_strtoupper and pg_strtolower functions

2022-05-02 Thread Ashutosh Bapat
On Mon, May 2, 2022 at 6:21 PM Bharath Rupireddy wrote: > > 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 thou