On Mon, Mar 7, 2011 at 1:20 PM, Piotr Czekalski <pczekal...@techbaza.pl> wrote: > Hello pgsql community, > > Is there any string function (other than regex / scan & compare loop) to > obtain a list (or even a count) of characters within a string? > strpos and position seems to return only first occurence of a char/string > within substring. > The goal is to check if a string contains equal number of opening and > closing parenthesis, and if there are any of them. > > Regards, > > Piotr Czekalski
Couple examples here that might help to get you started http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Get_count_of_substrings_in_string -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql