Re: [SQL] A function to count all ocurrences of a character within a string.

2011-03-07 Thread Ross J. Reedstrom
On Mon, Mar 07, 2011 at 02:08:10PM -0800, bricklen wrote: > On Mon, Mar 7, 2011 at 1:20 PM, Piotr Czekalski > 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? > > s

Re: [SQL] A function to count all ocurrences of a character within a string.

2011-03-07 Thread bricklen
On Mon, Mar 7, 2011 at 1:20 PM, Piotr Czekalski 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

[SQL] A function to count all ocurrences of a character within a string.

2011-03-07 Thread Piotr Czekalski
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 eq