Spliting a string in plpgsql

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Spliting a string in plpgsql
Date: 2007-05-08 16:44:28
Message-ID: a47902760705080944sf043e8dp992b6a46571106e4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I'm writing a function in plpgsql and i need to do the following:

I have a string in the following format.

mail.yahoo.com

In this string, i need to figure out the number of dots in it and split the
string into two
on last but one dot.

Is there any way to accomplish this.
Please let me know

Thanks
~Jas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Murphy 2007-05-08 16:45:09 Idle session timeout?
Previous Message Tom Lane 2007-05-08 16:34:46 Re: Building Pg 8.2.4 on AIX 5.3 doesn't produce shared libs?