multiple columns in rlm_sql

petr.linke at seznam.cz petr.linke at seznam.cz
Mon Apr 16 14:09:52 CEST 2018


---------- Original e-mail ----------
From: Alan DeKok <aland at deployingradius.com>
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Date: 16. 4. 2018 14:02:24
Subject: Re: multiple columns in rlm_sql 
Hi Alan,
the answer "You can't dynamically assign the left side in v3." is enough for
me. I start testing according Alan Buxey response, but now I know, that the 
way of dynamic assignment left side is wrong. Thank you. And the test_
attribute is defined in my dictionary only for tests.

Many thanks you for your excellent work and really fast response, nice day, 
Petr Linke
 
"
> On Apr 16, 2018, at 7:45 AM, <petr.linke at seznam.cz> <petr.linke at seznam.cz>
wrote:
> update control {
> Tmp-String-0 := %{sql:SELECT CONCAT(attribute,'#',value) from database_
> table where...}
> }
> if ( control:Tmp-String-0 =~ /^(\S+)#(.*)$/ ) {
> update reply {
> "%{1}" += "%{2}"

You can't dynamically assign the left side in v3.

i.e. the left side of an attribute assignment *must* be a fixed string. All 
of the examples and documentation show this.

> test_attribute += "%{2}"

What's "test_attribute" ?

The left side of assignments MUST be a known attribute name, taken from the 
dictionaries. Again, all of the examples and documentation show this. 
Nothing suggests that you can just invent things here.

Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.
html"


More information about the Freeradius-Users mailing list