PostgreSQL equivelant of this MySQL query

From: Madison Kelly <linux(at)alteeve(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PostgreSQL equivelant of this MySQL query
Date: 2007-07-14 01:39:31
Message-ID: 46982953.7030804@alteeve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Madison Kelly 2007-07-14 02:04:28 Re: PostgreSQL equivelant of this MySQL query
Previous Message Michael Glaesemann 2007-07-14 01:06:36 Re: pg_dump vs schemas