How to use large SQL-query for %{sql:} clause?

George Koulyabin jumbo at vinf.ru
Tue Aug 25 11:17:01 CEST 2009


On Tue, Aug 25, 2009 at 09:42:24AM +0100, Ivan Kalik wrote:
> > I am needing to generate values of reply attributes via SQL. I am using
> > `%{sql:SQL-query}` clause.
> > I am inserting attribute/value pairs into radreply table, where value -
> > `%{sql:}`-clause.
> > But I had got complex and large queries. I don't want to increase size of
> > fields of SQL-table.
> > How I can solve this problem?
> 
> Just add them to the reply list without putting them into the table. Why
> write them into the table and then read them from there?

I want to set some quota for users. Quota is calculated from user's configuration and 
amount of eated service. Name of service is defined into auth-packet. Other words
quota must be calculated as 'some_prefix(service_name) + max_allowed_amount(service_name) - 
already_eated_amount(service_name)'. I am needing to recalculate quota after incoming
auth-packet.



More information about the Freeradius-Users mailing list