Function to return number of words in a string?

From: Peter Fein <pfein(at)pobox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Function to return number of words in a string?
Date: 2005-05-09 16:21:28
Message-ID: 20050509112128.02077a86@layout.pfein.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hiya-

I'm looking for a function to return the number of words in a string,
split on whitespace. I'm coming from python, so I may just write it in
that but I wanted to check first. In python, one would write:

s="some string or other"
len(s.split())

Thanks!

--
Peter Fein pfein(at)pobox(dot)com 773-575-0694

Basically, if you're not a utopianist, you're a schmuck. -J. Feldman

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2005-05-09 16:25:35 Re: Postgres and GnuPlot
Previous Message Masse Jacques 2005-05-09 16:09:34 Re: aide postgres