>> Failed to find PostgreSQL equivalent for below one because I did not
>> understand what it does in the first place.
>>
>> SELECT
>> CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
>> FROM users WHERE email='%s'
It looks to me like this would work as well or better in PG:
select regexp_replace(email, '^(.*)@(.*)$', '\2/\1/') from ...
--
Andrew (irc:RhodiumToad)