I'm trying move hash cheking from server app to PostgreSQL. In other words I'm need calling a query to PGSQL, which compare string from query with string from field and return result of equal comparison as bool, but I don't know how do this without procedures on clear SQL.
upd: I have table users with field password(currently text, in the future - bytea). I want write sometihng like
select * from values ('WrittenPassword' = users.password) where username = 'someuser' ,
which must return true or false as result of equal comparison.