Search Postgresql Archives

MySQL insert() and instr() equiv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using MySQL I have one select that uses MySQL functions so I am
wondering about the best way to go to end up with the same result in
PostgreSQL.

uid is an email address stored in the passwd table as user@xxxxxxxxxx
and this construct allows an incoming username such as "user.domain.com"
to be compared to the stored "user@xxxxxxxxxx".

SELECT wpath FROM passwd WHERE uid="\L" OR insert(uid,instr(uid,'@'),1,'.')="\L"

--markc


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux