[exim-dev] [Bug 932] deprecated escaping in pgsql lookup

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Miro
Data:  
Para: exim-dev
Asunto: [exim-dev] [Bug 932] deprecated escaping in pgsql lookup
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=932




--- Comment #2 from Miro <bug@???>  2009-12-14 14:04:16 ---
For example, 
router:
virtual_user:
    driver = accept
    domains = +local_domains
    condition = ${if eq{}{${lookup pgsql {SELECT id FROM exim_users WHERE \
                login=lower('${quote_pgsql:$local_part}') AND
domena=lower('${quote_pgsql:$domain}')}}}{no}{yes}}
    transport = virtual_delivery


When local_part contains underscore pgsql lookup creates sql query like this:
SELECT id FROM exim_users WHERE login=lower('test\_test') AND
domena=lower('kolekcja.mejor.pl')

I think query should looks like this:
SELECT id FROM exim_users WHERE login=lower(E'test\_test') AND
domena=lower(E'kolekcja.mejor.pl')
but only when postgres is older than 8.1
(http://www.postgresql.org/docs/8.1/interactive/release-8-1.html ), E20.2 ,
point "Add E'' syntax so eventually ordinary strings can treat backslashes
literally (Bruce)".


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email