From: | paddy carroll <paddy(dot)carroll(at)gmail(dot)com> |
---|---|
To: | Madison Kelly <linux(at)alteeve(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PostgreSQL equivelant of this MySQL query |
Date: | 2007-07-15 07:45:05 |
Message-ID: | 10CC2C37-9FFF-40D0-B966-420CAF762129@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
select split_part(usr_email,'@',2) ||split_part(usr_email,'@',1)
from ..
> Hi all,
>
> I am reading through some docs on switching to Postfix with a SQL
> backend. The docs use MySQL but I want to use PgSQL so I am trying
> to adapt as I go. I am stuck though; can anyone help give me the
> PgSQL equiv. of:
>
> SELECT CONCAT(SUBSTRING_INDEX(usr_email,'@',-1),'/',SUBSTRING_INDEX
> (usr_email,'@',1),'/') FROM users WHERE usr_id=1;
>
> If the 'usr_email' value is 'person(at)domain(dot)com' this should
> return 'domain.com/person'.
>
> Thanks for the help!
>
> Madison
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | paddy carroll | 2007-07-15 07:53:54 | SMTP |
Previous Message | Mike | 2007-07-14 19:14:44 | Re: How to Cluster an Index live? |