[postgis-users] ERROR: invalid regular expression: parentheses () not balanced

Thiemo Kellner thiemo at gelassene-pferde.biz
Thu Dec 17 15:13:26 PST 2020


  In the case that the task is to select all records from mytable  
where the full_address contains the string pao_text, the like clause  
is probably much more efficient:

select * from mytable where full_address like '%pao_text%';

Performance might not be an issue here but it is never bad to have an  
eye on efficiency in my opinion.

Cheers

Thiemo

Quoting Bo Victor Thomsen <bo.victor.thomsen at gmail.com>:

> select * from mytable where full_address ~* 'pao_text';
>                                                                                 ^                
> ^
>
>   You've forgotten the string delimiters
> Med venlig hilsen / Kind regards  Bo Victor Thomsen   Den 17-12-2020  
> kl. 11:53 skrev Shaozhong SHI:
>
>> select * from mytable where full_address ~* pao_text;
  S/MIME Public Key:
https://oc.gelassene-pferde.biz/index.php/s/eJuAUFONag6ofnH
Signal (Safer than WhatsApp): +49 1578 7723737
Threema (Safer than WhatsApp): A76MKH3J
Handys: +41 78 947 36 21 | +49 1578 772 37 37
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201218/2dbf321a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4001 bytes
Desc: S/MIME Signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201218/2dbf321a/attachment.bin>


More information about the postgis-users mailing list