Tabs in SQL queries...

Alan DeKok aland at deployingradius.com
Mon Jul 23 14:29:57 CEST 2012


Phil Mayers wrote:
> One other option, that might be more generally usable, is to modify the
> config file parser to strip the indent present on the 1st from 2nd and
> subsequent lines when using continuations. At the moment, this:
> 
> some_query = "select foo from \
>               bar where x=1"
> 
> ...becomes:
> 
> "select foo from               bar where x=1"
> 
> ...whereas the more intuitive result is:
> 
> "select foo from bar where x=1"

  Yes.

> I think this is what leads to the whitespace in debugged SQL queries?

  Exactly.  But knowing *which* spaces to remove is hard.  They're just
data inside of a double-quoted string.

  Alan DeKok.


More information about the Freeradius-Devel mailing list