Re: Aren't regex_*() functions built-in? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Aren't regex_*() functions built-in?
Date
Msg-id a479d6c0-b7eb-46ab-bb82-fc23774556da@aklaver.com
Whole thread Raw
In response to Aren't regex_*() functions built-in?  (pf@pfortin.com)
Responses Re: Aren't regex_*() functions built-in?
List pgsql-general
On 11/11/23 16:25, pf@pfortin.com wrote:
Reply to list also
Ccing list
> On Sat, 11 Nov 2023 16:16:20 -0800 Adrian Klaver wrote:
> 

>> Probably because it is spelled regexp_replace ().
> 
> OK,  found it in pg_catalog; but "create extension regexp_replace;" won't
> load it. How do I get regexp_* into public schema?

Not sure why you are trying create extension regexp_replace;.

The functions are already loaded:

\df regexp_replace
                                         List of functions
    Schema   |      Name      | Result data type |           Argument 
data types            | Type
------------+----------------+------------------+------------------------------------------+------
  pg_catalog | regexp_replace | text             | text, text, text 
                    | func
  pg_catalog | regexp_replace | text             | text, text, text, 
integer                | func
  pg_catalog | regexp_replace | text             | text, text, text, 
integer, integer       | func
  pg_catalog | regexp_replace | text             | text, text, text, 
integer, integer, text | func
  pg_catalog | regexp_replace | text             | text, text, text, 
text                   | func


Just just them:

select regexp_replace('Thomas', '.[mN]a.', 'M');
  regexp_replace
----------------
  ThM


> 
> Sorry if this a newbie question...
> 
>>> ncsbe=# \df "replace"
>>>                             List of functions
>>>      Schema   |  Name   | Result data type | Argument data types | Type
>>> ------------+---------+------------------+---------------------+------
>>>    pg_catalog | replace | text             | text, text, text    | func
>>> (1 row)
>>>
>>> ncsbe=# \df "regex"
>>>                          List of functions
>>>    Schema | Name | Result data type | Argument data types | Type
>>> --------+------+------------------+---------------------+------
>>> (0 rows)
>>>
>>> There are no regex* functions in /usr/share/postgresql/extension
>>>
>>> Thanks,
>>> Pierre
>>>
>>>    
>>

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Aren't regex_*() functions built-in?
Next
From: pf@pfortin.com
Date:
Subject: Re: Aren't regex_*() functions built-in?