[FIX] sql_db: port fix from psycopg/psycopg2#459
[FIX] sql_db: port fix from psycopg/psycopg2#459

NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.

alexcuellar/odoo,glovebx/odoo,datenbetrieb/odoo,tvibliani/odoo,datenbetrieb/odoo,odootr/odoo,diagramsoftware/odoo,spadae22/odoo,funkring/fdoo,CatsAndDogsbvba/odoo,alexcuellar/odoo,funkring/fdoo,CatsAndDogsbvba/odoo,glovebx/odoo,odootr/odoo,funkring/fdoo,OpenUpgrade/OpenUpgrade,datenbetrieb/odoo,CatsAndDogsbvba/odoo,makinacorpus/odoo,tvibliani/odoo,glovebx/odoo,diagramsoftware/odoo,alexcuellar/odoo,makinacorpus/odoo,CatsAndDogsbvba/odoo,Elico-Corp/odoo_OCB,Nowheresly/odoo,Nowheresly/odoo,odootr/odoo,odootr/odoo,vnsofthe/odoo,synconics/odoo,leorochael/odoo,spadae22/odoo,NeovaHealth/odoo,Elico-Corp/odoo_OCB,glovebx/odoo,alexcuellar/odoo,vnsofthe/odoo,OpenUpgrade/OpenUpgrade,NeovaHealth/odoo,glovebx/odoo,ygol/odoo,NeovaHealth/odoo,OpenUpgrade/OpenUpgrade,Nowheresly/odoo,ygol/odoo,ygol/odoo,diagramsoftware/odoo,datenbetrieb/odoo,odootr/odoo,leorochael/odoo,diagramsoftware/odoo,alexcuellar/odoo,funkring/fdoo,ygol/odoo,vnsofthe/odoo,ygol/odoo,Nowheresly/odoo,synconics/odoo,spadae22/odoo,makinacorpus/odoo,tvibliani/odoo,spadae22/odoo,NeovaHealth/odoo,diagramsoftware/odoo,synconics/odoo,glovebx/odoo,OpenUpgrade/OpenUpgrade,datenbetrieb/odoo,leorochael/odoo,makinacorpus/odoo,spadae22/odoo,synconics/odoo,CatsAndDogsbvba/odoo,ygol/odoo,Nowheresly/odoo,alexcuellar/odoo,OpenUpgrade/OpenUpgrade,Elico-Corp/odoo_OCB,tvibliani/odoo,leorochael/odoo,Nowheresly/odoo,leorochael/odoo,synconics/odoo,funkring/fdoo,CatsAndDogsbvba/odoo,odootr/odoo,funkring/fdoo,spadae22/odoo,vnsofthe/odoo,makinacorpus/odoo,funkring/fdoo,tvibliani/odoo,makinacorpus/odoo,glovebx/odoo,CatsAndDogsbvba/odoo,odootr/odoo,datenbetrieb/odoo,vnsofthe/odoo,spadae22/odoo,Elico-Corp/odoo_OCB,ygol/odoo,diagramsoftware/odoo,Nowheresly/odoo,alexcuellar/odoo,vnsofthe/odoo,diagramsoftware/odoo,OpenUpgrade/OpenUpgrade,leorochael/odoo,leorochael/odoo,NeovaHealth/odoo,datenbetrieb/odoo,vnsofthe/odoo,NeovaHealth/odoo,Elico-Corp/odoo_OCB,Elico-Corp/odoo_OCB,makinacorpus/odoo,OpenUpgrade/OpenUpgrade,NeovaHealth/odoo,synconics/odoo,tvibliani/odoo,synconics/odoo,tvibliani/odoo