2005-06-28 メールアドレスの前半のみ抜く PostgreSQL select substring(mail,1,position('@' in mail)-1) from table_name;