Re: proposal: prefix function
От | Chris Travers |
---|---|
Тема | Re: proposal: prefix function |
Дата | |
Msg-id | CAN-RpxCYJZjxng587z1429r-HpneFh39zo-poeTXdy1WSXn9yA@mail.gmail.com обсуждение исходный текст |
Ответ на | proposal: prefix function (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: prefix function
Re: proposal: prefix function |
Список | pgsql-hackers |
On Fri, Sep 21, 2018 at 10:09 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hican we implement prefix function for fast test if substr is prefix of some string?create or replace function prefix(str text, substr text)returns boolean as $$
select substr(str, 1, length(substr)) = substr
$$ language sql;This function can be very effective in C language. Now it should be implemented with like or regexp, what is significantly more expensive.
These would just be wrappers around already existing internal functions, right?
RegardsPavel
Best Regards,
Chris Travers
Head of Database
Saarbrücker Straße 37a, 10405 Berlin
В списке pgsql-hackers по дате отправления: