Re: [PATCH] Add support for leading/trailing bytea trim()ing

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: [PATCH] Add support for leading/trailing bytea trim()ing
Дата
Msg-id 50a26f18-0275-4843-b960-52890eb59f73@www.fastmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add support for leading/trailing bytea trim()ing  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Add support for leading/trailing bytea trim()ing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Dec 4, 2020, at 17:37, Tom Lane wrote:
>No objection in principle, but you need to extend the code added by
>commit 40c24bfef to know about these functions.

Oh, I see, that's a very nice improvement.

I've now added F_LTRIM_BYTEA_BYTEA and F_RTRIM_BYTEA_BYTEA to ruleutils.c accordingly,
and also added regress tests to create_view.sql.

>The grammar in the functions' descr strings seems a bit shaky too.

Not sure what you mean? The grammar is unchanged, since it was already supported,
but the overloaded bytea functions were missing.

I did however notice I forgot to update the description in func.sgml
for the bytea version of trim(). Maybe that's what you meant was shaky?
I've changed the description to read:

-        <parameter>bytesremoved</parameter> from the start
-        and end of <parameter>bytes</parameter>.
+        <parameter>bytesremoved</parameter> from the start,
+        the end, or both ends of <parameter>bytes</parameter>.
+        (<literal>BOTH</literal> is the default)

New patch attached.

/Joel
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexey Kondratov
Дата:
Сообщение: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Следующее
От: Andres Freund
Дата:
Сообщение: Re: WIP: WAL prefetch (another approach)