Tatsuo Ishii wrote:
>>Now a new function similar to toast_raw_datum_size(), maybe
>>toast_raw_datum_strlen() could be used to get the original string
>>length, whether MB or not, without needing to retrieve and decompress
>>the entire datum.
>>
>>I understand we would either: have to steal anot
> Now, in the multibyte case, again in textlen(), I see:
>
>/* optimization for single byte encoding */
>if (pg_database_encoding_max_length() <= 1)
> PG_RETURN_INT32(VARSIZE(t) - VARHDRSZ);
>
>PG_RETURN_INT32(
>pg_mbstrlen_with_len(VARDATA(t), VARSIZE(t) - VARHDRSZ));
>
Tatsuo Ishii wrote:
>>Any objection if I rework this function to meet SQL92 and fix the bug?
> I don't object.
One more question on this: how can I generate some characters with > 1
encoding length? I need a way to test the work I'm doing, and I'm not
quite sure how to test it.
Just making a
Tatsuo Ishii wrote:
>>Any objection if I rework this function to meet SQL92 and fix the bug?
>
I've started working on text_substr() as described in this thread (which
is hopefully prep work for the replace() function that started the
thread). I haven't really looked at toast or multibyte clo
> Any objection if I rework this function to meet SQL92 and fix the bug?
I don't object.
> Or is the SQL92 part not desirable because it breaks backward
> compatability?
I don't think so.
> In any case, can the #ifdef MULTIBYTE's be removed now in favor of a
> test for encoding max length?
Joe Conway wrote:
> more work than I had time for when I wrote the current replace(). But as
> I said, if there is support for getting this into the backend, I'll add
> it to my todo list:
>
> - Create new backend function replace()
> - Either create new backend functions, or merge into existin
Thomas Lockhart wrote:
> (crossposted to -hackers, should follow up on that list)
> OK, this is in the "can't do it what we have" category. Should we have
> it accept a regular expression rather than a simple string? In either
> case it should probably go into the main distro. Except that I se
(crossposted to -hackers, should follow up on that list)
> Well, OVERLAY is defined as:
> overlay(string placing string from integer [for integer])
> and replace() is defined (by me at least) as:
> replace(inputstring, old-substr, new-substr)
OK.
> OVERLAY requires that I know the "fr