Re: [GENERAL] Executing regex in C code

2017-07-30 Thread Gabriel Furstenheim Milerud
Thanks a lot, That did the trick Best regards On 30 July 2017 at 18:26, Tom Lane wrote: > Gabriel Furstenheim Milerud writes: > > I'm trying to execute the equivalent to '~' with regexp from within C > code. > > > text * s = cstring_to_text("aa"); > > text * p = cstring_to_text("a"); > >

Re: [GENERAL] Executing regex in C code

2017-07-30 Thread Tom Lane
Gabriel Furstenheim Milerud writes: > I'm trying to execute the equivalent to '~' with regexp from within C code. > text * s = cstring_to_text("aa"); > text * p = cstring_to_text("a"); > return DatumGetBool(DirectFunctionCall2(textregexeq, PointerGetDatum(s), > PointerGetDatum(p))); > But

[GENERAL] Executing regex in C code

2017-07-30 Thread Gabriel Furstenheim Milerud
Hi, I'm trying to execute the equivalent to '~' with regexp from within C code. According to pg_operator this operator for type text corresponds to textregexeq: DATA(insert OID =