<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
In which statement do you implement this query?<BR> <BR>
<HR id=stopSpelling>
Date: Sat, 16 Oct 2010 11:49:36 -0400<BR>Subject: plpgsql freeradius authentication function<BR>From: kakyea@gmail.com<BR>To: freeradius-users@lists.freeradius.org<BR><BR>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><BR>- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html </body>
</html>