Hi<br><br>I have a plpgsql function being called from freeradius to do authentication but i keep getting<br>Access-Reject from radius although when i run the function without freeradius it works fine.<br>Please find below the function and how i call it<br>
<br>CREATE OR REPLACE FUNCTION try (your_name TEXT, tiger TEXT) RETURNS RECORD AS $$<br> DECLARE<br> users_rec RECORD;<br> <br> BEGIN<br> if tiger = '0000' then<br>
SELECT INTO users_rec * FROM aniradcheck WHERE username = your_name;<br> else <br> SELECT INTO users_rec * FROM radcheck WHERE username = your_name;<br> end if;<br> RETURN users_rec.username; <br> END;<br>
<br>$$ LANGUAGE plpgsql;<br><br><br>SELECT id,username,attribute,op,value FROM try('7140944444','0000') as(id integer,username varchar,attribute varchar,op character,value varchar);<br><br><br>Appreciate if you can help<br>
Thanks <br>