SELECT *
FROM (
SELECT field_a, field_b, my_function(field_c) fc
FROM mytable
) q
WHERE field_b = fc
The return type of your function to be SETOF(eg SETOF INT, SETOF VARCHARetc.)
Note that you can use a style expression INas follows:
SELECT field_a, field_b
FROM mytable
WHERE field_b IN (SELECT my_function(field_c))
but if your function returns a complex type, the old style is preferable, since you can compare with one field of a complex type and return another in one request, for example:
FUNCTION my_function RETURNS SETOF anothertable
SELECT field_a, field_b, fc.column1, fc.column2
FROM (
SELECT field_a, field_b, my_function(field_c) fc
FROM mytable
) q
WHERE field_b = fc.column1
column1 column1, column2.
.